[SPARK-56461][SS] Disable File Checksum for Checkpoint Format Version 1#55328
Open
zifeif2 wants to merge 4 commits intoapache:masterfrom
Open
[SPARK-56461][SS] Disable File Checksum for Checkpoint Format Version 1#55328zifeif2 wants to merge 4 commits intoapache:masterfrom
zifeif2 wants to merge 4 commits intoapache:masterfrom
Conversation
zifeif2
commented
Apr 14, 2026
| s"$enableStateStoreCheckpointIds" | ||
| testWithChangelogCheckpointingDisabled(newTestName, testTags: _*) { | ||
| enableStateStoreCheckpointIds => testBody(enableStateStoreCheckpointIds) | ||
| val v2Confs = if (enableStateStoreCheckpointIds) { |
Contributor
Author
There was a problem hiding this comment.
Fix the bug here - previously the tests weren't running
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Modified checkpointFileChecksumEnabled to require both the SQL conf setting AND checkpoint format version >= 2 (via enableStateStoreCheckpointIds):
This effectively disables file checksum when checkpoint version is v1, regardless of the conf setting.
Also update a list of tests that were testing checksum behavior on ckpt version 1 to version 2
Also fixed helper function
testWithStateStoreCheckpointIdsAndChangelogEnabledwhich was not running any test because previous implementation passenableStateStoreCheckpointIds => testBody(enableStateStoreCheckpointIds)to underlyingtestWithChangelogCheckpointingDisabledwhich expects a function without any parameters.Why are the changes needed?
When using checkpoint format version 1 (STATE_STORE_CHECKPOINT_FORMAT_VERSION = 1), file checksum verification (spark.sql.streaming.checkpoint.fileChecksum.enabled) can query failure during query restart. This is because v1 does not use unique file names per batch attempt — if a batch fails and is retried, the same file name is reused, which can cause the checksum from a previous attempt to mismatch with the file content from the new attempt.
Does this PR introduce any user-facing change?
No
How was this patch tested?
See added unit tests
Was this patch authored or co-authored using generative AI tooling?
yes