Bug 429006

Summary: Deleted files are not removed from the index
Product: [Frameworks and Libraries] frameworks-baloo Reporter: Franco Pellegrini <francogpellegrini>
Component: generalAssignee: Stefan Brüns <stefan.bruens>
Status: RESOLVED DUPLICATE    
Severity: normal CC: alexander.lohnau, bugseforuns, darrylkacher, heri+kde, jan.rathmann, katyaberezyaka, kishore96, leviatan1, nate, plasma-bugs, tagwerk19
Priority: NOR    
Version: 5.75.0   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=392793
https://bugs.kde.org/show_bug.cgi?id=353874
https://bugs.kde.org/show_bug.cgi?id=397071
https://bugs.kde.org/show_bug.cgi?id=455606
https://bugs.kde.org/show_bug.cgi?id=457746
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Franco Pellegrini 2020-11-12 10:53:47 UTC
SUMMARY
I delete a lot of pdf files through several months. When I type them on krunner or usen super key, I can find them cluttering all search results.

STEPS TO REPRODUCE
1. delete indexed pdf files
2. you can find them

OBSERVED RESULT
I can find deleted files months ago

EXPECTED RESULT
to CLEAN deleted files from indexation

SOFTWARE/OS VERSIONS
Operating System: KDE neon 5.20
KDE Plasma Version: 5.20.3
KDE Frameworks Version: 5.75.0
Qt Version: 5.15.1
Kernel Version: 5.4.0-53-generic
OS Type: 64-bit
Processors: 6 × Intel® Core™ i5-8400 CPU @ 2.80GHz
Memory: 22.9 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 630
Comment 1 Nate Graham 2020-11-13 14:57:46 UTC
Seems like an issue with the baloo runner, or even baloo itself.

If you run `baloosearch <some file name of a deleted file>` does it show you any results?
Comment 2 Franco Pellegrini 2020-11-13 15:18:40 UTC
Yep... I test this file (deleted almost 3 month ago) and I get this results, twice.

baloosearch Turnos.pdf
/home/franco/Descargas/Turnos.pdf
/home/franco/Descargas/Turnos.pdf
Elapsed: 1.59796 msecs
Comment 3 Nate Graham 2020-11-13 16:15:28 UTC
Gotcha. Looks like the problem is in Baloo.
Comment 4 Nate Graham 2020-11-19 15:04:01 UTC
*** Bug 416171 has been marked as a duplicate of this bug. ***
Comment 5 tagwerk19 2021-03-08 20:21:50 UTC
Found a way of generating "duplicate" hits in baloo 8-)

Posted it to the wrong bug 8-(

See:
    https://bugs.kde.org/show_bug.cgi?id=433116#c3
Comment 6 tagwerk19 2021-03-08 20:25:14 UTC
Can see it's possible, can reproduce, so mark as Confirmed
Comment 7 francisco_t 2021-05-05 15:15:42 UTC
In my case it was when moving many files from one folder to another. Now the results appear duplicated.

ppp@moon:~$ baloosearch neon
/home/ppp/Documentos/neon install
/home/ppp/ppp_old/Documentos/neon install


Operating System: KDE neon 5.21
KDE Plasma Version: 5.21.4
KDE Frameworks Version: 5.81.0
Qt Version: 5.15.2
Kernel Version: 5.8.0-50-generic
OS Type: 64-bit
Graphics Platform: X11
Comment 8 tagwerk19 2021-05-09 18:01:31 UTC
(In reply to francisco_t from comment #7)
> In my case it was when moving many files from one folder to another. Now the
> results appear duplicated.
I tried a mix of variations but couldn't reproduce the exactly problem you are having...), maybe something related though:

I created a folder "ppp_old", a testfile under Documents, purged the baloo index, waited and "mv"d the Documents folder

    cd
    mkdir ppp_old
    echo "Hello Penguin" > Documents/testfile.txt
    balooctl purge
    mv Documents ppp_old

Baloo did *not* see the change. Baloosearch showed the files still in the non-existant Documents folder.

    baloosearch testfile
    /home/test/Documents/testfile.txt

Running

    balooctl check 

resolved this. Not the same as you see but, seemingly, a variant of:

    https://bugs.kde.org/show_bug.cgi?id=392793#c3
Comment 9 tagwerk19 2021-05-10 06:12:30 UTC
(In reply to tagwerk19 from comment #8)
> ... maybe something related though ...
Sorry, that was also with:
    Neon User
    Plasma: 5.21.4
    Frameworks: 5.81.0
    Qt: 5.15.2
Comment 10 tagwerk19 2021-05-28 18:10:08 UTC
In the case you are deleting a *load* of files - more than the value given by
    sysctl fs.inotify.max_queued_events
the queue of events may overflow and baloo may not catch up with the deletions.

Noted in
    https://bugs.kde.org/show_bug.cgi?id=437754#c1
Comment 11 Jan Rathmann 2024-02-29 09:12:42 UTC

*** This bug has been marked as a duplicate of bug 353874 ***