[Nepomuk] Review Request 109747: ResourceWatcher: switch to using KDbusConnectionPool

Simeon Bird bladud at gmail.com
Thu Mar 28 20:44:10 UTC 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/109747/
-----------------------------------------------------------

(Updated March 28, 2013, 8:44 p.m.)


Review request for Nepomuk, David Faure and Vishesh Handa.


Changes
-------

An extra comment


Description
-------

ResourceWatcher: switch to using KDbusConnectionPool


Tidy up ResourceData::propertyAdded.

If an entry is not found in a QHash, it will return an empty list,
so we only need to check for contains one way.

Rework determineUri so that the RM lock isn't held during the executeQuery


fix lock order in resetAll


early return if nothing to do (noop, just makes the code clearer)


Fix bad threading in ResourceManagerPrivate::addToWatcher dbus usage.

Instead of doing MoveToThread, take the resourceManager mutex before
talking to the ResourceWatcher. This is a lot clearer and less racy.
It should not be too contended now the rm mutex is not held over the
socket communication.

BUG: 305024
FIXED-IN: 4.10.3

ResourceData: Change updateKickOffLists to take three arguments, the uri, old and new values.

This means that it does not need to be under the dataMutex anymore,
which in turn means that we no longer need to remember to lock the RM
mutex before calling it, just to remember to unlock the dataMutex.
This in turn means that we can add a property that isn't NIE::url() or
NAO::identifier to the Resource without taking the mutex at all.

Remove unneeded parameter from ResourceData::resetAll


This addresses bug 305024.
    http://bugs.kde.org/show_bug.cgi?id=305024


Diffs (updated)
-----

  libnepomukcore/datamanagement/resourcewatcher.cpp f394ae8705fa882b9f4329f93ea7d18c1cfabc73 
  libnepomukcore/resource/resource.cpp 7158802cf1e1ba48da86f103aa9311c7acbe24fe 
  libnepomukcore/resource/resourcedata.h 39508764682b798290c1ae5b74a2384f9cbcbf58 
  libnepomukcore/resource/resourcedata.cpp 7a979745ca22c88a3a73921d9c0e64b51e064c38 
  libnepomukcore/resource/resourcemanager.cpp 2b32be01176059932cc1c2cf3b1f348ed91e982b 

Diff: http://git.reviewboard.kde.org/r/109747/diff/


Testing
-------

Compiled, ran, used activities for a while.


Thanks,

Simeon Bird

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/nepomuk/attachments/20130328/bc6cbcc6/attachment.html>


More information about the Nepomuk mailing list