[balooctl] Streamline indexer control commands
ClosedPublic

Authored by bruns on Jun 8 2019, 5:07 PM.

Details

Summary

Currently, there are 7 commands which start/stop the indexer in some way:

  • stop/start/restart: stops or/and starts the indexer process, effective for the current session (on next login, the indexer is started when enabled).
  • suspend/resume: the indexer process keeps running, but does not process any file events (files added/delete/modified ...).
  • disable/enable: sets the enable state in the config, stops the indexer process and deletes the database. On enable (even when already enabled) forces a full reindex via the 'firstRun' flag. The deletion of the DB file was done silently.

The large number of similar commands is confusing by itself, and more
so its side effects.

The restart command was also racy, as it tried to start baloo_file even
when the old instance still held the DBus interface, then the new instance
would directly exit.

This removes the stop/start/restart command alltogether, and removes the
deletion of the DB from the disable command. Enable/disable still
starts/stops the 'baloo_file' process.

To allow deletion of the DB via CLI, a new "purge" command is added. In
case the indexer was enabled/running, it is kept enabled.

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.Jun 8 2019, 5:07 PM
Restricted Application added projects: Frameworks, Baloo. · View Herald TranscriptJun 8 2019, 5:07 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
bruns requested review of this revision.Jun 8 2019, 5:07 PM
ngraham accepted this revision.Jun 10 2019, 4:45 PM

+100, this is super duper better now.

This revision is now accepted and ready to land.Jun 10 2019, 4:45 PM
This revision was automatically updated to reflect the committed changes.