Diffusion Baloo e58804bf9eb8

React to config updates inside indexer

Authored by poboiko on Nov 14 2018, 12:58 PM.

Description

React to config updates inside indexer

Summary:
In case a config was changed, we need to:

  1. Stop the ContentIndexer (bug 373430)
  2. Remove all scheduled indexing of files that should not be indexed
  3. Check for stale index entries. Those includes documents marked for indexing, that should be removed

(because of that we need to do it inside scheduleIndexing before content indexing)

  1. Finally, check for unindexed files (if new files were added)

(based on D15939: Perform checks for unindexed files and stale index entries on startup). Also note that IndexCleaner should clean all files, not just those inside includeFolders

BUG: 373430

Test Plan:
Seems to be working. But it would be nice to test it more.

  1. Add large folder to config. baloo_file start indexing it.
  2. Add it to exclude list. baloo_file stops indexing it, and removes entries from DB.
  3. Remove it from exclude list. baloo_file starts indexing it again.

Reviewers: Baloo, Frameworks, bruns, ngraham

Reviewed By: Baloo, ngraham

Subscribers: kde-frameworks-devel, bruns

Tags: Frameworks, Baloo

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

Details

Committed
poboikoMar 20 2019, 9:01 AM
Reviewer
Baloo
Differential Revision
D15983: React to config updates inside indexer
Parents
R293:57b9e32ff6c8: Fix regression when opening DB in read-write mode
Branches
Unknown
Tags
Unknown