Skip to content

[SS][SPARK-52637] Fix version ID mismatch issue for RocksDB compaction leading to incorrect file mapping #51340

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

liviazhu
Copy link
Contributor

@liviazhu liviazhu commented Jul 1, 2025

What changes were proposed in this pull request?

We found a bug leading to checkpoint corruption with RocksDB VersionID Mismatch error due to local file mappings not being cleared correctly when native RocksDB does a compaction resulting in the original SST file not being deleted. This resulted in the DFS file UUID being reused for 2 SST files that were not the same, leading the version ID mismatch.

This change purges from the local file mappings any mapping that was created by a version equal or greater than the one loaded.

Why are the changes needed?

The described bug fails streaming queries.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

New unit test

Was this patch authored or co-authored using generative AI tooling?

No

@liviazhu liviazhu changed the title [SPARK-52637] Fix version ID mismatch issue for RocksDB compaction leading to incorrect file mapping [SS][SPARK-52637] Fix version ID mismatch issue for RocksDB compaction leading to incorrect file mapping Jul 1, 2025
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.

1 participant