D16255: [Scheduler] Fix wrong usage of obsolete QFileInfo::created() timestamp
This revision was automatically updated to reflect the committed changes. Closed by commit R293:43ab022f35e8: [Scheduler] Fix wrong usage of obsolete QFileInfo::created() timestamp (authored by bruns). REPOSITORY R293 Baloo CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D16255?vs=43747=44216 REVISION DETAIL https://phabricator.kde.org/D16255 AFFECTED FILES src/engine/documenttimedb.h src/file/basicindexingjob.cpp src/file/modifiedfileindexer.cpp src/file/unindexedfileiterator.cpp To: bruns, #baloo, #frameworks, poboiko, ngraham, lbeltrame Cc: lbeltrame, kde-frameworks-devel, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams
D16255: [Scheduler] Fix wrong usage of obsolete QFileInfo::created() timestamp
lbeltrame accepted this revision. This revision is now accepted and ready to land. REPOSITORY R293 Baloo BRANCH indexer_cleanup REVISION DETAIL https://phabricator.kde.org/D16255 To: bruns, #baloo, #frameworks, poboiko, ngraham, lbeltrame Cc: lbeltrame, kde-frameworks-devel, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams
D16255: [Scheduler] Fix wrong usage of obsolete QFileInfo::created() timestamp
bruns added a comment. Good to go? REPOSITORY R293 Baloo REVISION DETAIL https://phabricator.kde.org/D16255 To: bruns, #baloo, #frameworks, poboiko, ngraham Cc: lbeltrame, kde-frameworks-devel, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams
D16255: [Scheduler] Fix wrong usage of obsolete QFileInfo::created() timestamp
lbeltrame added a comment. +1, looks fine to me as far as I understand. REPOSITORY R293 Baloo REVISION DETAIL https://phabricator.kde.org/D16255 To: bruns, #baloo, #frameworks, poboiko, ngraham Cc: lbeltrame, kde-frameworks-devel, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams
D16255: [Scheduler] Fix wrong usage of obsolete QFileInfo::created() timestamp
ngraham added a comment. Very nice catch! I'm afraid my brain is not big enough to review this one though. REPOSITORY R293 Baloo REVISION DETAIL https://phabricator.kde.org/D16255 To: bruns, #baloo, #frameworks, poboiko, ngraham Cc: kde-frameworks-devel, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams
D16255: [Scheduler] Fix wrong usage of obsolete QFileInfo::created() timestamp
bruns edited the summary of this revision. REPOSITORY R293 Baloo REVISION DETAIL https://phabricator.kde.org/D16255 To: bruns, #baloo, #frameworks, poboiko, ngraham Cc: kde-frameworks-devel, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams
D16255: [Scheduler] Fix wrong usage of obsolete QFileInfo::created() timestamp
bruns edited the summary of this revision. REPOSITORY R293 Baloo REVISION DETAIL https://phabricator.kde.org/D16255 To: bruns, #baloo, #frameworks, poboiko, ngraham Cc: kde-frameworks-devel, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams
D16255: [Scheduler] Fix wrong usage of obsolete QFileInfo::created() timestamp
bruns created this revision. bruns added reviewers: Baloo, Frameworks, poboiko, ngraham. Herald added projects: Frameworks, Baloo. Herald added a subscriber: kde-frameworks-devel. bruns requested review of this revision. REVISION 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. 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) REPOSITORY R293 Baloo BRANCH indexer_cleanup REVISION DETAIL https://phabricator.kde.org/D16255 AFFECTED FILES src/engine/documenttimedb.h src/file/basicindexingjob.cpp src/file/modifiedfileindexer.cpp src/file/unindexedfileiterator.cpp To: bruns, #baloo, #frameworks, poboiko, ngraham Cc: kde-frameworks-devel, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams