Bug 419708 - Disabling, purging and re-enabling baloo search fails.
Summary: Disabling, purging and re-enabling baloo search fails.
Status: RESOLVED NOT A BUG
Alias: None
Product: frameworks-baloo
Classification: Frameworks and Libraries
Component: balooctl (other bugs)
Version First Reported In: 5.69.0
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Stefan Brüns
URL:
Keywords:
: 419989 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-04-06 07:35 UTC by tagwerk19
Modified: 2025-10-12 16:53 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Write config changes back to disc (262 bytes, text/plain)
2020-04-26 11:58 UTC, tagwerk19
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tagwerk19 2020-04-06 07:35:46 UTC
SUMMARY:

    If baloo is disabled and the database purged, it needs to be reenabled twice to restart indexing.

STEPS TO REPRODUCE:

    Run

        balooctl disable
        balooctl purge
        balooctl enable
        balooctl status

OBSERVED RESULTS:

    balooctl status says:

        Baloo Index could not be opened

    A concurrently running "balooctl monitor" saying:

        Waiting for file indexer to start

    Running "balooctl enable" a second time and repeating the "balooctl status" gives:

        Baloo File Indexer is running
        Indexer state: Idle (Powersave)
        Total files indexed: 0
        Files waiting for content indexing: 0
        Files failed to index: 0

EXPECTED RESULTS:

    balooctl enable starts (or restart) the indexing

SOFTWARE/OS VERSIONS:

    Balooctl 5.69.0
    from Neon Testing

    KDE Plasma 5.18.4
    KDE Frameworks 5.69.0
    Qt 5.14.1 

ADDITIONAL INFORMATION:

    Purging the database without disabling it works as expected; that is

        balooctl purge
        balooctl status

    purges the database and restarts the indexing fine.

    Maybe a regression between Frameworks 5.67 and 5.68
Comment 1 Patrick Silva 2020-04-13 15:31:58 UTC
*** Bug 419989 has been marked as a duplicate of this bug. ***
Comment 2 Stefan Brüns 2020-04-18 13:24:29 UTC
Don't run 'balooctl disable' before 'balooctl purge', purge does the right things by itself.
Comment 3 tagwerk19 2020-04-26 11:58:41 UTC
Created attachment 127889 [details]
Write config changes back to disc

Here's a suggested patch that brings back the Frameworks 5.67 behaviour.

Tested with Neon Developer Edition and build with

   sudo apt install liblmdb-dev
   sudo apt install python-virtualenv

   mkdir ~/baloo-env
   cd ~/baloo-env
   git clone git://anongit.kde.org/baloo
   cmake baloo -DCMAKE_INSTALL_PREFIX=~/baloo-env

   make -j4

It looks as if the indexing configuration was changed but the change was not written back to disc before the indexer was run.

Hope this helps. Thanks for baloo!
Comment 4 Christoph Feck 2020-04-28 06:50:04 UTC
Please submit patches to our code review site. For more information, please see https://community.kde.org/Get_Involved/development

This website currently seems to have an issue with its sidebar menu; you need to scroll down to see the contents.
Comment 5 Bug Janitor Service 2025-07-31 11:42:14 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/baloo/-/merge_requests/246
Comment 6 Méven 2025-10-12 16:53:41 UTC
Git commit c7f82b902796b853ed0345d53a4d2eae224e191b by Méven Car, on behalf of Archaeopteryx Lithographica.
Committed on 12/10/2025 at 16:53.
Pushed by meven into branch 'master'.

[balooctl] Writeback config changes before enabling or disabling indexing.

Currently if enabling or disabling indexing, the change to the baloofilerc
is not written to the file before attempting the action.

Change the scope of the IndexerConfig change to save the changed state before
starting or stopping the service.

M  +5    -2    src/tools/balooctl/main.cpp

https://invent.kde.org/frameworks/baloo/-/commit/c7f82b902796b853ed0345d53a4d2eae224e191b