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 657065 - Cache keeps around contacts from disabled accounts
Cache keeps around contacts from disabled accounts
Status: RESOLVED FIXED
Product: folks
Classification: Platform
Component: Telepathy backend
git master
Other Linux
: Normal normal
: folks-0.6.4
Assigned To: folks-maint
folks-maint
Depends on:
Blocks:
 
 
Reported: 2011-08-22 09:45 UTC by Jonny Lamb
Modified: 2011-09-14 19:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add some more conditions for cache loads and unloads in Tpf.PersonaStore (5.25 KB, patch)
2011-08-22 23:01 UTC, Philip Withnall
committed Details | Review

Description Jonny Lamb 2011-08-22 09:45:31 UTC
I am using Empathy with a new enough folks to have the persona cache.

I enabled a test account and all the test contacts from that account appeared in my contact list. I disabled the account and all the contacts stayed around in my contact list. I don't think we should keep showing these contacts even when the account is disabled, so folks shouldn't expose these.
Comment 1 Guillaume Desmottes 2011-08-22 09:46:12 UTC
I agree.
Comment 2 Philip Withnall 2011-08-22 23:01:17 UTC
Created attachment 194437 [details] [review]
Add some more conditions for cache loads and unloads in Tpf.PersonaStore

https://www.gitorious.org/folks/folks/commits/657065-cache-fixes

Hopefully this will fix it. I couldn't actually reproduce the problem: I think because my HDD is slow, which changed the race condition between two calls to Tpf.PersonaStore._store_cache() and Tpf.PersonaStore._load_cache() which I think was causing the issue.

Jonny, would you mind giving this folks branch a spin and seeing what happens?
Comment 3 Raul Gutierrez Segales 2011-08-29 12:46:52 UTC
Didn't make this release; punting to 0.6.2.
Comment 4 Travis Reitter 2011-09-05 16:49:34 UTC
(Punting bugs to 0.6.4)
Comment 5 Philip Withnall 2011-09-13 22:49:09 UTC
Anybody fancy some reviewing?
Comment 6 Raul Gutierrez Segales 2011-09-14 12:22:16 UTC
Comment on attachment 194437 [details] [review]
Add some more conditions for cache loads and unloads in Tpf.PersonaStore

Sorry for the delay - patch looks good. I wasn't able to reproduce this though.
Comment 7 Philip Withnall 2011-09-14 19:38:41 UTC
Comment on attachment 194437 [details] [review]
Add some more conditions for cache loads and unloads in Tpf.PersonaStore

Committed with an addition to NEWS.

commit 419fbf6a4c4a4701f1520bac2ccc9269dded015b
Author: Philip Withnall <philip@tecnocode.co.uk>
Date:   Mon Aug 22 23:54:08 2011 +0100

    Bug 657065 — Cache keeps around contacts from disabled accounts
    
    Add some extra conditions on loading and storing the Tpf.PersonaStore cache,
    so as to prevent loading it when the account is disabled or invalid, and to
    prevent storing it unnecessarily.
    
    This also adds some extra debug output to Tpf.PersonaStore's caching methods.
    
    Closes: bgo#657065

 NEWS                                          |    1 +
 backends/telepathy/lib/tpf-persona-store.vala |   64 +++++++++++++++++-------
 2 files changed, 46 insertions(+), 19 deletions(-)