Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[improve][misc] Set format_version=5, checksum=kxxHash in Bookkeeper RocksDB configs #23175

Merged
merged 3 commits into from
Aug 16, 2024

Conversation

lhotari
Copy link
Member

@lhotari lhotari commented Aug 15, 2024

Motivation

RocksDB format_version 5 has been supported since RocksDB 6.6 . It's required for certain performance optimizations.
Currently the default is format_version=2 which is really old. It's better to default to a more modern version.

Changes

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

…ocksDB configs

- also fix invalid CFOptions config
@lhotari lhotari requested a review from dlg99 August 15, 2024 05:48
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Aug 15, 2024
@lhotari lhotari added this to the 4.0.0 milestone Aug 16, 2024
@nodece
Copy link
Member

nodece commented Aug 16, 2024

Could you explain the format_version compatible issue?

  1. There are RocksDB data with format_version=2 and then migrate format_version to 5 from 2
  2. There are RocksDB data with format_version=5 and then migrate format_version to 2 from 5

@lhotari
Copy link
Member Author

lhotari commented Aug 16, 2024

Could you explain the format_version compatible issue?

  1. There are RocksDB data with format_version=2 and then migrate format_version to 5 from 2
  2. There are RocksDB data with format_version=5 and then migrate format_version to 2 from 5

@nodece The option is used for new database files. It won't prevent reading existing database files created with a previous format_version such as 2. The format_version setting is ignored for existing database files (new files created in compaction will get written with configured format_version).
format_version=2 is really old and there shouldn't be any reason to use it.
format_version=5 is the default between RocksDB version >= 6.6 and < 9.0.

There's a problem in the current config files that format_version isn't set for conf/ledger_metadata_rocksdb.conf. It will use whatever is the default. This is a problem after upgrading to RocksDB 9.0+ since it would use format_version=6 and it wouldn't be possible to downgrade to older RocksDB versions because of that.
That's why it's necessary to specify the format_version.

@lhotari lhotari merged commit 576666d into apache:master Aug 16, 2024
61 of 62 checks passed
grssam pushed a commit to grssam/pulsar that referenced this pull request Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-not-needed Your PR changes do not impact docs ready-to-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants