Bug 406309

Summary: Tags reappear after being merged when several merge processes overlap(?)
Product: [Applications] digikam Reporter: Jens <jens-bugs.kde.org>
Component: Tags-EngineAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: 6.1.0   
Target Milestone: ---   
Platform: Appimage   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 6.1.0
Sentry Crash Report:

Description Jens 2019-04-07 17:57:50 UTC
SUMMARY
see $SUBJECT

STEPS TO REPRODUCE
1. create tags with lots of photos on them on a slow disk with XMP sidecars enabled and lazy sync off (?)
2. merge these tags
3. while the sync process is running, merge two other tags

OBSERVED RESULT
Merged tags sometimes reappear with a couple of photos.

EXPECTED RESULT
Synced tags should never reappear.

It is possible that the sync process updating the XMP sidecars is "overtaken" by a DB update process re-reading the XMP sidecars when the second merge process starts, and so ready old data?
Maybe digikam should pause/postpone sync processes if conflicting reads/writes to not-yet-synced metadata can occur. But I can't prove that this is actually the root cause of what I observed, it's just a guess.

ADDITIONAL INFORMATION
KDE Neon 18.04 with all updates applied, Digikam appimage 6.1.0-git as of 20190403.
Comment 1 Maik Qualmann 2019-04-07 20:04:33 UTC
Git commit fd95ee87a298ebf230c728b96df59dca7d821521 by Maik Qualmann.
Committed on 07/04/2019 at 20:03.
Pushed by mqualmann into branch 'master'.

check for running process
FIXED-IN: 6.1.0

M  +2    -2    NEWS
M  +14   -0    core/libs/album/manager/albummanager_talbum.cpp

https://commits.kde.org/digikam/fd95ee87a298ebf230c728b96df59dca7d821521