Skip to content

KAFKA-20096: Add documentation about the incompatibility of RocksDB file format#21397

Open
iit2009060 wants to merge 1 commit intoapache:trunkfrom
iit2009060:KAFKA-20096-documentation
Open

KAFKA-20096: Add documentation about the incompatibility of RocksDB file format#21397
iit2009060 wants to merge 1 commit intoapache:trunkfrom
iit2009060:KAFKA-20096-documentation

Conversation

@iit2009060
Copy link
Contributor

@iit2009060 iit2009060 commented Feb 4, 2026

Document the limitation we have in RocksDB upgrade due to file format
version change.

Reviewers: Matthias J. Sax matthias@confluent.io

@github-actions github-actions bot added triage PRs from the community docs small Small PRs labels Feb 4, 2026
@mjsax mjsax added streams ci-approved and removed triage PRs from the community labels Feb 4, 2026
@mjsax mjsax changed the title KAFKA-20096 documenting the incompatibility of RocksDB file format KAFKA-20096: Add documentation about the incompatibility of RocksDB file format Feb 4, 2026

Downgrading from 3.0.x or newer version to 2.8.x or older version needs special attention: Since 3.0.0 release, Kafka Streams uses a newer RocksDB version whose on-disk format changed. This means that old versioned RocksDB would not be able to recognize the bytes written by that newer versioned RocksDB, and hence it is harder to downgrade Kafka Streams with version 3.0.0 or newer to older versions in-flight. Users need to wipe out the local RocksDB state stores written by the new versioned Kafka Streams before swapping in the older versioned Kafka Streams bytecode, which would then restore the state stores with the old on-disk format from the changelogs.

Downgrading from 4.0.x or newer version to older than 4.0.0 needs special attention: Since 4.0.0 release, Kafka Streams upgraded RocksDB from version 7.9.2 to 9.7.3. This upgrade introduces a RocksDB file format version change from version 5 to version 6 (introduced in RocksDB 8.6). While the newer RocksDB version (9.7.3) can read state stores written in the old format (version 5), the older RocksDB versions cannot read state stores written in the new format (version 6). This means that downgrading from Kafka Streams 4.0.x or newer to versions older than 4.0.0 in-flight is not possible without data loss. Users must wipe out the local RocksDB state stores written by Kafka Streams 4.0.x or newer before downgrading to versions older than 4.0.0, which will then restore the state stores from the changelogs using the old file format. For more details, see [KAFKA-20096](https://issues.apache.org/jira/browse/KAFKA-20096).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Downgrading from 4.0.x or newer version to older than 4.0.0 needs special attention: Since 4.0.0 release, Kafka Streams upgraded RocksDB from version 7.9.2 to 9.7.3. This upgrade introduces a RocksDB file format version change from version 5 to version 6 (introduced in RocksDB 8.6). While the newer RocksDB version (9.7.3) can read state stores written in the old format (version 5), the older RocksDB versions cannot read state stores written in the new format (version 6). This means that downgrading from Kafka Streams 4.0.x or newer to versions older than 4.0.0 in-flight is not possible without data loss. Users must wipe out the local RocksDB state stores written by Kafka Streams 4.0.x or newer before downgrading to versions older than 4.0.0, which will then restore the state stores from the changelogs using the old file format. For more details, see [KAFKA-20096](https://issues.apache.org/jira/browse/KAFKA-20096).
Downgrading from 4.0.x or newer version to older than 4.0.0 needs special attention: Since 4.0.0 release, Kafka Streams upgraded RocksDB from version 7.9.2 to 9.7.3. This upgrade introduces a RocksDB file format version change from version 5 to version 6 (introduced in RocksDB 8.6). While the newer RocksDB version (9.7.3) can read state stores written in the old format (version 5), the older RocksDB versions cannot read state stores written in the new format (version 6). This means that downgrading from Kafka Streams 4.0.x or newer to versions older than 4.0.0 in-flight is not possible out-of-the-box. Users must first delete the local RocksDB state stores written by Kafka Streams 4.0.x or newer before downgrading to versions older than 4.0.0, which will then restore the state stores from the changelogs using the old file format.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"data loss" does not sound accurate. The next sentence explains that data can be recovered from the changelog, so data is not lost.

"wipe out" is too colloquial IMHO.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just see, that we also use "wipe out" in the paragraph above. Might be worth to also change with this PR :)

Copy link
Member

@mjsax mjsax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM. Some minor suggestions.

Thanks for the PR.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants