Bug 349615 - Semantic information (tags, etc.) not updated when changed elsewhere (e.g. Dolphin)
Summary: Semantic information (tags, etc.) not updated when changed elsewhere (e.g. Do...
Status: RESOLVED FIXED
Alias: None
Product: gwenview
Classification: Applications
Component: general (show other bugs)
Version: 17.08.0
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Gwenview Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-26 09:24 UTC by Michael D
Modified: 2023-08-31 16:37 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael D 2015-06-26 09:24:28 UTC
If I open a file XYZ in gwenview and then change its rating in Dolphin, and view some other images and go back to XYZ, the rating change doesn't show in gwenview. If I reopen gwenview, it shows just fine.

My file system is EXT4 and I've no problems with Baloo or xattrs.

Reproducible: Always

Steps to Reproduce:
1. Open a file XYZ in Gwenview
2. Change semantic data of XYZ in Dolphin
3. Navigate around in Gwenview to other images and then go back to XYZ

Actual Results:  
XYZ does not show updated semantic information

Expected Results:  
Semantic info is shown

KDE 4.14.2
Comment 1 Nate Graham 2017-09-09 01:46:14 UTC
Same thing with Dolphin in reverse, in fact.
Comment 2 Stefan Brüns 2018-10-16 18:05:55 UTC
The <someprogram> -> Dolphin update should be fixed with
https://phabricator.kde.org/D16255
Comment 3 Michael D 2018-10-16 20:15:15 UTC
Great. However, things have been working for me for some time now, so I'm not sure whether D16255 is relevant to my problem.
Comment 4 Nate Graham 2018-10-17 01:54:41 UTC
Thanks!
Comment 5 Stefan Brüns 2018-10-25 16:11:24 UTC
Git commit 43ab022f35e812b71ab866402c16505aab929529 by Stefan Brüns.
Committed on 25/10/2018 at 16:11.
Pushed by bruns into branch 'master'.

[Scheduler] Fix wrong usage of obsolete QFileInfo::created() timestamp

Summary:
Baloo uses the metadata change time (stat.st_ctime, man 7 inode) to check
for XAttr updates. This field corresponds to
QFileInfo::metadataChangeTime(), while created() returns the first
available of [birthtime, ctime, mtime].

On filesystems supporting birthtime (XFS, BTRFS) some files were
continously reindexed as the BasicIndexingJob stored the ctime, while the
UnindexedFileIterator compared the stored value with the btime. On the
other hand, XAttr changes where not detected when ctime and btime
initially matched, as the btime is fixed.

While at it, document the semantics of the two timestamps.
Related: bug 397549

Test Plan:
1. watch baloo_file with strace -efile during startup
  -> files with btime != ctime are indexed just once
2. add a Tag to a file
  -> file is immediately updated in index, not just after
  baloo_file restart (e.g. session restart)

Reviewers: #baloo, #frameworks, poboiko, ngraham, lbeltrame

Reviewed By: lbeltrame

Subscribers: lbeltrame, kde-frameworks-devel

Tags: #frameworks, #baloo

Differential Revision: https://phabricator.kde.org/D16255

M  +11   -3    src/engine/documenttimedb.h
M  +1    -1    src/file/basicindexingjob.cpp
M  +10   -3    src/file/modifiedfileindexer.cpp
M  +10   -1    src/file/unindexedfileiterator.cpp

https://commits.kde.org/baloo/43ab022f35e812b71ab866402c16505aab929529