Skip to content

chore(config): remove the deprecated configuration rocksdb.max_background_{compactions,flushes} and set default to -1#3398

Merged
git-hulk merged 6 commits intoapache:unstablefrom
yatriks:ys/update-default-configs
Mar 24, 2026
Merged

chore(config): remove the deprecated configuration rocksdb.max_background_{compactions,flushes} and set default to -1#3398
git-hulk merged 6 commits intoapache:unstablefrom
yatriks:ys/update-default-configs

Conversation

@yatriks
Copy link
Contributor

@yatriks yatriks commented Mar 22, 2026

This PR will:

  • update the default values of rocksdb.max_background_compactions and rocksdb.max_background_flushes from 2 to -1
  • unset them from kvrocks.conf and update comments to reflect RocksDB's decision logic for max background threads

NOTE: This doesn't make it so that rocksdb.max_background_compactions is unsettable, like rocksdb.max_background_flushes currently is. This may be desirable for people who do currently use the old overrides, but afaik it would lock people in to max_background_flushes = 2 - but that's already the case as far as I can tell.

I ran each of:

./x.py format (unrelated changes)
./x.py build --unittest
./x.py test cpp 

Tests all pass and formatting changes are unrelated.

This is effectively an addition to #1665
See #3395 for more background.

- unset them from kvrocks.conf and update comments
@aleksraiden aleksraiden requested a review from PragmaTwice March 22, 2026 20:50
@yatriks
Copy link
Contributor Author

yatriks commented Mar 22, 2026

Also I cannot recall if setting READONLY on the option makes it read-only for everything or just CLI...that would inform whether we update max_background_compactions to readonly. I can verify later.

Removed deprecated configuration options for background compactions and flushes.
git-hulk
git-hulk previously approved these changes Mar 23, 2026
@yatriks
Copy link
Contributor Author

yatriks commented Mar 23, 2026

@git-hulk Sorry will need another review.
also set max_background_compactions to READONLY (which I checked doesn't preclude setting it from kvrocks.conf) for consistency. Feel free to revert this if it's problematic for a reason I did not foresee.

@yatriks yatriks requested a review from git-hulk March 23, 2026 18:57
Co-authored-by: hulk <hulk.website@gmail.com>
@git-hulk git-hulk changed the title chore(config): Set rocksdb.max_background_{compactions,flushes} default to -1 chore(config): remove the deprecated configuration rocksdb.max_background_{compactions,flushes} and set default to -1 Mar 24, 2026
@git-hulk git-hulk enabled auto-merge (squash) March 24, 2026 03:16
@git-hulk git-hulk merged commit b7423c4 into apache:unstable Mar 24, 2026
37 checks passed
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants