Bug 462009 - After changing config settings, old entries/paths may be reported in the progress info
Summary: After changing config settings, old entries/paths may be reported in the prog...
Status: CONFIRMED
Alias: None
Product: frameworks-baloo
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.99.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: baloo-bugs-null
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2022-11-18 21:11 UTC by francisco_t
Modified: 2023-11-13 21:41 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
baloo no index (40.42 KB, image/jpeg)
2022-11-18 21:11 UTC, francisco_t
Details

Note You need to log in before you can comment on or make changes to this bug.
Description francisco_t 2022-11-18 21:11:22 UTC
Created attachment 153874 [details]
baloo no index

SUMMARY
Baloo indexes folders configured not to index in KCM baloo.


STEPS TO REPRODUCE
0.- I have a search database but I want to purge it.
1.- I have a "games" folder so that it does not index in the searches.
2.- I stop the search in the system preferences.
3.- I uncheck all the search boxes and apply.
4.- I exit the preferences and re-enter the search options.
5.- Now I get the option to delete the database and start over. I delete it and baloo starts from zero.

OBSERVED RESULT
The folders to not index continue from the previous configuration (check screenshot), but I can't delete them and when the search starts it indexes them even.

EXPECTED RESULT
Baloo does not index folders configured for non-indexing.



SOFTWARE/OS VERSIONS
Operating System: Manjaro Linux
KDE Plasma Version: 5.26.3
KDE Frameworks Version: 5.99.0
Qt Version: 5.15.7
Kernel Version: 6.0.8-1-MANJARO (64-bit)
Graphics Platform: X11
Comment 1 Nate Graham 2022-11-29 20:13:02 UTC
Does it work if you:
1. Add the excluded folders using the KCM
2. Turn off indexing
3. Purge the index
4. reboot
5. Turn on indexing again?
Comment 2 francisco_t 2022-11-29 21:40:15 UTC
(In reply to Nate Graham from comment #1)
> Does it work if you:
> 1. Add the excluded folders using the KCM
> 2. Turn off indexing
> 3. Purge the index
> 4. reboot
> 5. Turn on indexing again?

You are right. If I reboot my system, the KCM search menu works correctly and Baloo does not index the folders that were previously set up.
Comment 3 Nate Graham 2022-11-30 17:11:26 UTC
Thanks. In the meantime I guess we could mention in the KCM that a restart is needed to make the settings take effect.
Comment 4 Bug Janitor Service 2022-12-02 00:55:38 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/1271
Comment 5 Nate Graham 2022-12-14 00:27:04 UTC
Git commit 4afb2b44bb816319c1d64dff1b6c2e7dbaeb3f63 by Nate Graham.
Committed on 14/12/2022 at 00:25.
Pushed by ngraham into branch 'master'.

kcms/baloo: prompt and warn users to reboot after changing settings

When many Baloo indexing settings are changed, running worker processes
don't respect those changes until they are killed and re-launched. Right
now Baloo does not do this, or notify them immediately of changed
settings in all cases.

It should, and that would be ideal. Until this happens, let's warn users
about this and prompt them to reboot, so they aren't confused by why
their changes to indexing settings aren't taking effect.

This message can be removed once https://bugs.kde.org/show_bug.cgi?id=462009
is fully fixed by applying changes live.

M  +10   -0    kcms/baloo/kcm.cpp
M  +4    -0    kcms/baloo/kcm.h
M  +27   -0    kcms/baloo/package/contents/ui/main.qml

https://invent.kde.org/plasma/plasma-desktop/commit/4afb2b44bb816319c1d64dff1b6c2e7dbaeb3f63
Comment 6 Stefan Brüns 2023-07-08 13:44:25 UTC
The analysis is apparently wrong.

The KCM sends a DBus signal to Baloo when the config is changed, and Baloo handles this signal.

The KCM quits baloo via DBus signal when indexing is disabled, and Baloo is stopped.

The seen "wrong" behavior is most probably an artifact, when the content indexer sees a file marked for content indexing it will emit the URL of the file, check if it should be indexed, and if not removes the entry and continues with the next file.

Rebooting is completely unnecessary. The relevant part is to add the unwanted folders to the config, hit apply, and then let the indexer catch up with the current config.

If there is a bug, then its in the wording of the KCM status line.
Comment 7 Bug Janitor Service 2023-07-08 14:26:33 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/1606
Comment 8 Stefan Brüns 2023-07-08 16:46:45 UTC
Git commit 7c946c26986f685ac9400dde83f714768611c0d8 by Stefan Brüns.
Committed on 08/07/2023 at 14:12.
Pushed by bruns into branch 'master'.

Revert "kcms/baloo: prompt and warn users to reboot after changing settings"

This reverts commit 4afb2b44bb816319c1d64dff1b6c2e7dbaeb3f63.

Baloo already does pick up config changes at runtime, contrary to the
statement of the original commit.

The "bug" noticed by the reporter is just an artifact of the status/progress
reporting.

Claiming "Baloo needs a restart" when it does not puts Baloo in a bad light,
and should be avoided.
Related: bug 467531

M  +0    -10   kcms/baloo/kcm.cpp
M  +0    -4    kcms/baloo/kcm.h
M  +0    -27   kcms/baloo/ui/main.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/7c946c26986f685ac9400dde83f714768611c0d8
Comment 9 Bug Janitor Service 2023-07-09 13:15:28 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/baloo/-/merge_requests/160
Comment 10 Stefan Brüns 2023-07-09 13:24:08 UTC
Git commit 43baad236dab33ed7107d1ce6b3289203e79408c by Stefan Brüns.
Committed on 09/07/2023 at 13:14.
Pushed by bruns into branch 'master'.

[Extractor] Do not emit startedIndexingFile for skipped documents

The signal was already omitted for deleted files, so there is precedence
for not emitting it.

The signal will now only be emitted if an extractor is actually started
for the file, otherwise emit only finishedIndexingFile.

M  +6    -3    src/file/extractor/app.cpp

https://invent.kde.org/frameworks/baloo/-/commit/43baad236dab33ed7107d1ce6b3289203e79408c
Comment 11 Stefan Brüns 2023-11-13 21:41:26 UTC
Git commit 16271af71c7ac04627b3e3e6221668c9773817a8 by Stefan Brüns.
Committed on 13/11/2023 at 21:41.
Pushed by bruns into branch 'kf5'.

[Extractor] Do not emit startedIndexingFile for skipped documents

The signal was already omitted for deleted files, so there is precedence
for not emitting it.

The signal will now only be emitted if an extractor is actually started
for the file, otherwise emit only finishedIndexingFile.
(cherry picked from commit 43baad236dab33ed7107d1ce6b3289203e79408c)

M  +6    -3    src/file/extractor/app.cpp

https://invent.kde.org/frameworks/baloo/-/commit/16271af71c7ac04627b3e3e6221668c9773817a8