After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 667410 - A second instance of the aggregator only fetch a small subset of my contacts
A second instance of the aggregator only fetch a small subset of my contacts
Status: RESOLVED FIXED
Product: folks
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: Unset
Assigned To: folks-maint
folks-maint
: 657357 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-01-06 13:25 UTC by Guillaume Desmottes
Modified: 2012-01-09 11:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
test app (1.56 KB, text/x-csrc)
2012-01-06 13:25 UTC, Guillaume Desmottes
  Details
Fix multiple aggregator instances sharing a BackendStore (10.85 KB, patch)
2012-01-06 23:15 UTC, Philip Withnall
committed Details | Review

Description Guillaume Desmottes 2012-01-06 13:25:35 UTC
Created attachment 204743 [details]
test app

I get this when running the attached test app:


TOTAL 737 individuals
CREATE aggregator 0x7e26e0
TOTAL 175 individuals
CREATE aggregator 0x879160
TOTAL 175 individuals
CREATE aggregator 0x7e20c0
TOTAL 175 individuals
CREATE aggregator 0x7e26e0
TOTAL 175 individuals
CREATE aggregator 0x879160
TOTAL 175 individuals
CREATE aggregator 0x7e20c0
TOTAL 175 individuals
CREATE aggregator 0x7e26e0


As you can see only the first instance of the aggregator manages to fetch all my individuals.
Comment 1 Philip Withnall 2012-01-06 23:15:13 UTC
Created attachment 204789 [details] [review]
Fix multiple aggregator instances sharing a BackendStore

This should fix the problem (it does for me). Can you give it a test and see if it fixes the problem for you too? Thanks.
Comment 2 Philip Withnall 2012-01-06 23:15:44 UTC
(Branch is here: https://www.gitorious.org/folks/folks/commits/667410-multiple-aggregators)
Comment 3 Guillaume Desmottes 2012-01-09 10:12:55 UTC
Yep, seems to work just fine now, thanks!
Comment 4 Philip Withnall 2012-01-09 11:27:26 UTC
Comment on attachment 204789 [details] [review]
Fix multiple aggregator instances sharing a BackendStore

Merged!

commit bf8dfa934b1e6fa31818d51a3eba5cbb04a1632b
Author: Philip Withnall <philip@tecnocode.co.uk>
Date:   Fri Jan 6 23:08:10 2012 +0000

    telepathy: Keep Tpf.PersonaStore.personas up to date for cached stores
    
    When loading a Tpf.PersonaStore from its cache, ensure Personas are inserted
    into both the set of personas _and_ the map of IIDs to personas.
    
    This fixes Tpf.PersonaStore.personas being empty for cached stores.
    
    Helps: https://bugzilla.gnome.org/show_bug.cgi?id=667410

 backends/telepathy/lib/tpf-persona-store.vala |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

commit d258c86814c0dd4405a8a2b7a45f3d2a036fa1eb
Author: Philip Withnall <philip@tecnocode.co.uk>
Date:   Fri Jan 6 23:05:05 2012 +0000

    Bug 667410 — A second aggregator instance only fetches a subset of contacts
    
    This was happening because the initial BackendStore was hanging around across
    multiple IndividualAggregator instances, keeping all the Backends,
    PersonaStores and Personas alive.
    
    The IndividualAggregator didn’t have code to deal with pre-prepared Backends
    and PersonaStores, meaning it never realised the Personas existed (because
    they weren’t announced via personas-changed signals), and thus never created
    Individuals out of them.
    
    This commit fixes the problem by having IndividualAggregator check for
    existing Backends, PersonaStores and Personas when prepare() is called.
    
    It also adds a test case to the folks test suite, based on the one written
    by Guillaume in bgo#667410.
    
    Closes: https://bugzilla.gnome.org/show_bug.cgi?id=667410

 NEWS                             |    2 +
 folks/backend.vala               |   10 ++++
 folks/individual-aggregator.vala |   50 ++++++++++++++++++++-
 folks/persona-store.vala         |   10 ++++
 tests/folks/init.vala            |   91 ++++++++++++++++++++++++++++++++++++++
 5 files changed, 161 insertions(+), 2 deletions(-)
Comment 5 Philip Withnall 2012-01-09 11:32:05 UTC
*** Bug 657357 has been marked as a duplicate of this bug. ***