D19290: Fix intermittent race in collectionattributetest

David Faure noreply at phabricator.kde.org
Sun Feb 24 21:54:48 GMT 2019


dfaure created this revision.
dfaure added a reviewer: dvratil.
Herald added a project: KDE PIM.
dfaure requested review of this revision.

REVISION SUMMARY
  Any CollectionModifyJob of a collection with attributes, would send the
  full list of attributes, even if they hadn't changed. This leads to the
  following problem:
  
  - collectionattributetest creates a collection with an attribute
  - it then proceeds to modify the attribute
  - then the knut resource's collectionAdded() wants to add a
  
  remoteid to that collection, so it creates a ModifyJob of its own
  (and that's where the bug happens: it includes all attributes, with the
  orig value).
  
  Therefore the old value overwrites the new value again.
  
  Fixed by only sending attributes if they have changed.

TEST PLAN
  collectionattributetest in a loop, doesn't fail anymore

REPOSITORY
  R165 Akonadi

BRANCH
  Applications/18.12

REVISION DETAIL
  https://phabricator.kde.org/D19290

AFFECTED FILES
  src/core/collection.cpp
  src/core/collection_p.h
  src/core/jobs/collectionmodifyjob.cpp

To: dfaure, dvratil
Cc: kde-pim, dvasin, rodsevich, winterz, vkrause, mlaurent, knauss, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20190224/cbbec219/attachment.html>


More information about the kde-pim mailing list