Remove document from MTimeDB/DocumentTimeDB even when timestamp is 0
ClosedPublic

Authored by bruns on Apr 5 2019, 8:24 PM.

Details

Summary

Commit 628daced19b8 ("allow ctime/mtime == 0") removed the asserts
checking for 0 (anyway only effective for debug builds), but left
the code for the timestamp removal unchanged.

Test Plan

$> touch -d '@0' xxx.txt
$> balooshow 'mtime<1980-01-01'

-> xxx.txt shows up

$> touch xxx.txt
$> balooshow 'mtime<1980-01-01'

-> xxx.txt no longer shown

Diff Detail

Repository
R293 Baloo
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
bruns created this revision.Apr 5 2019, 8:24 PM
Restricted Application added projects: Frameworks, Baloo. · View Herald TranscriptApr 5 2019, 8:24 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
bruns requested review of this revision.Apr 5 2019, 8:24 PM
This revision is now accepted and ready to land.Apr 5 2019, 8:26 PM
bruns added a comment.Apr 5 2019, 8:33 PM

I wonder if this might help https://bugs.kde.org/show_bug.cgi?id=395902.

Probably one of the issues with the lmdb freelist.

This revision was automatically updated to reflect the committed changes.
dfaure added a subscriber: dfaure.Apr 6 2019, 10:51 AM

Somewhere around this commit, the unittest started to fail.

https://build.kde.org/job/Frameworks/view/Platform%20-%20SUSEQt5.10/job/baloo/job/kf5-qt5%20SUSEQt5.10/47/

QFATAL : WriteTransactionTest::testRemoveRecursively() ASSERT: "mtime > 0" in file /home/jenkins/workspace/Frameworks/baloo/kf5-qt5 SUSEQt5.10/src/engine/mtimedb.cpp, line 127
FAIL! : WriteTransactionTest::testRemoveRecursively() Received a fatal error.

Loc: [Unknown file(0)]

Totals: 6 passed, 1 failed, 0 skipped, 0 blacklisted, 73ms

Please investigate/fix.

bruns added a comment.Apr 6 2019, 4:29 PM

Somewhere around this commit, the unittest started to fail.

https://build.kde.org/job/Frameworks/view/Platform%20-%20SUSEQt5.10/job/baloo/job/kf5-qt5%20SUSEQt5.10/47/

QFATAL : WriteTransactionTest::testRemoveRecursively() ASSERT: "mtime > 0" in file /home/jenkins/workspace/Frameworks/baloo/kf5-qt5 SUSEQt5.10/src/engine/mtimedb.cpp, line 127
FAIL! : WriteTransactionTest::testRemoveRecursively() Received a fatal error.

Loc: [Unknown file(0)]

Totals: 6 passed, 1 failed, 0 skipped, 0 blacklisted, 73ms

Please investigate/fix.

The assert is just plain wrong ...

bruns added a comment.Apr 6 2019, 7:17 PM

The assert is just plain wrong ...

See D20315