[GLUTEN-12594][VL] Fix incorrect task attempt ID used for Uniffle block IDs#12595
Open
wForget wants to merge 1 commit into
Open
[GLUTEN-12594][VL] Fix incorrect task attempt ID used for Uniffle block IDs#12595wForget wants to merge 1 commit into
wForget wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes Uniffle block ID generation in the Velox columnar shuffle path by ensuring the task-attempt component encoded into Uniffle block IDs uses Uniffle’s stage-scoped task attempt ID scheme rather than Spark’s globally increasing TaskContext.taskAttemptId() (which can overflow Uniffle’s BlockIdLayout attempt-id bit width).
Changes:
- Derive a Uniffle-compatible (stage-scoped) block-id task attempt ID via
getTaskAttemptIdForBlockId(context.partitionId(), context.attemptNumber()). - Pass the derived
rssTaskAttemptIdintoVeloxUniffleColumnarShuffleWriterinstead ofcontext.taskAttemptId(). - Keep the string-form
taskIdunchanged (context.taskAttemptId() + "_" + context.attemptNumber()), limiting behavior changes to block ID encoding.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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 are proposed in this pull request?
Fix the task attempt ID used to generate Uniffle block IDs in the Velox columnar shuffle path.
Previously,
UniffleShuffleManager#getWriterpassed Spark's globally increasingTaskContext.taskAttemptId()toVeloxUniffleColumnarShuffleWriter. This value may exceed thenumber of bits reserved for task attempt IDs in Uniffle's
BlockIdLayout.This patch derives the task attempt ID using Uniffle's standard implementation:
The derived stage-scoped ID is passed to the columnar shuffle writer, matching the behavior of
Uniffle's standard
RssShuffleManager. The string-form task ID remains unchanged.Fixes #12594
How was this patch tested?
existing uniffle integration tests.
Was this patch authored or co-authored using generative AI tooling?
Generated-by: OpenAI Codex (GPT-5)