Repository navigation
[SPARK-59919][SS][4.2] Fix OffsetSeqMetadataV2 missing shuffle partitions on rebinding - #59291
Open
HeartSaVioR wants to merge 1 commit into
Open
HeartSaVioR wants to merge 1 commit into
HeartSaVioR wants to merge 1 commit into
Conversation
…on rebinding The changes in this PR: - Ensure that both V1 and V2 offset logs emit rebound SQL conf - Attempt to perform recovery of missing `spark.sql.shuffle.partitions` in V2 offset log by obtaining value from state metadata if possible With current implementation the stateful shuffle partitions are not written out by OffsetSeqMetadataV2. If query is restarted and the session configured shuffle partitions change, the query will fail. The exact error scenario and steps to reproduce are described in: https://issues.apache.org/jira/browse/SPARK-59919 The missing config key also leads to possible crash scenario as in apache#58929, which was addressed separately in that code path. Yes, see the detail in https://issues.apache.org/jira/browse/SPARK-59919 Tested with the included unit tests in this PR as well as with manual reproduction in spark Generated-by: GPT 5.6 Luna Closes apache#59221 from ivasilyev1/v2-shuffle-partitions. Authored-by: ivasilyev1 <25183110+ivasilyev1@users.noreply.github.com> Signed-off-by: Jungtaek Lim <kabhwan.opensource@gmail.com> (cherry picked from commit 5d17442)
Contributor
Author
|
Will merge once CI is green - this is a cherry-pick PR which resolves merge conflict. |
This branch has not been deployed
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?
The changes in this PR:
spark.sql.shuffle.partitionsin V2 offset log by obtaining value from state metadata if possibleWhy are the changes needed?
With current implementation the stateful shuffle partitions are not written out by OffsetSeqMetadataV2. If query is restarted and the session configured shuffle partitions change, the query will fail.
The exact error scenario and steps to reproduce are described in: https://issues.apache.org/jira/browse/SPARK-59919
The missing config key also leads to possible crash scenario as in #58929, which was addressed separately in that code path.
Does this PR introduce any user-facing change?
Yes, see the detail in https://issues.apache.org/jira/browse/SPARK-59919
How was this patch tested?
Tested with the included unit tests in this PR as well as with manual reproduction in spark
Was this patch authored or co-authored using generative AI tooling?
Generated-by: GPT 5.6 Luna