Skip to content

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
grssam pushed a commit to grssam/pulsar that referenced this pull request Sep 4, 2024
hanmz pushed a commit to hanmz/pulsar that referenced this pull request Feb 12, 2025
nodece pushed a commit to nodece/pulsar that referenced this pull request May 20, 2025
…RocksDB configs (apache#23175)

(cherry picked from commit 576666d)
Signed-off-by: Zixuan Liu <nodeces@gmail.com>
nodece pushed a commit to ascentstream/pulsar that referenced this pull request May 23, 2025
…RocksDB configs (apache#23175)

(cherry picked from commit 576666d)
Signed-off-by: Zixuan Liu <nodeces@gmail.com>
nodece pushed a commit to ascentstream/pulsar that referenced this pull request May 28, 2025
…RocksDB configs (apache#23175)

(cherry picked from commit 576666d)
Signed-off-by: Zixuan Liu <nodeces@gmail.com>
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