Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • B Baloo
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Bugzilla
    • Bugzilla
  • Merge requests 7
    • Merge requests 7
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Frameworks
  • Baloo
  • Merge requests
  • !46

WIP: Add API and implementation for compacting the Baloo database

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Oded Arbel requested to merge odeda/baloo:feature/compact-database into master Mar 30, 2021
  • Overview 15
  • Commits 4
  • Pipelines 19
  • Changes 7

The Baloo database can grow significantly on a large file system with a lot of files. If there is a lot of churn, the database can also grow to include a lot of slack - where a large part of the database is empty.

In one example, mdb_stat reports ~10GB of unused space in the database: https://bugs.kde.org/show_bug.cgi?id=354636#c10

This branch implements a Database API and appropriate D-Bus and balooctl integration to allow manual - and in the future maybe automatic - compaction of the database file by invoking mdb_env_copy2 with the MDB_CP_COMPACT flag and then replacing the old database with the copy.

Still missing test code and I'm also a bit worried about concurrency.

This is a work in progress and a suggestion to Baloo developers to implement functionality that I believe is missing from the current code base that is required for a modern file indexer. It is definitely not ready for release.

I would appreciate it if Baloo developers can review the code and offer suggestions and discuss the applicability of this change. Thanks in advance!

Edited Mar 30, 2021 by Oded Arbel
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: feature/compact-database