Skip to content

[GLUTEN-12594][VL] Fix incorrect task attempt ID used for Uniffle block IDs#12595

Open
wForget wants to merge 1 commit into
apache:mainfrom
wForget:GLUTEN-12594
Open

[GLUTEN-12594][VL] Fix incorrect task attempt ID used for Uniffle block IDs#12595
wForget wants to merge 1 commit into
apache:mainfrom
wForget:GLUTEN-12594

Conversation

@wForget

@wForget wForget commented Jul 22, 2026

Copy link
Copy Markdown
Member

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#getWriter passed Spark's globally increasing
TaskContext.taskAttemptId() to VeloxUniffleColumnarShuffleWriter. This value may exceed the
number of bits reserved for task attempt IDs in Uniffle's BlockIdLayout.

This patch derives the task attempt ID using Uniffle's standard implementation:

getTaskAttemptIdForBlockId(context.partitionId(), context.attemptNumber())

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)

Copilot AI review requested due to automatic review settings July 22, 2026 04:27
@github-actions github-actions Bot added the VELOX label Jul 22, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 rssTaskAttemptId into VeloxUniffleColumnarShuffleWriter instead of context.taskAttemptId().
  • Keep the string-form taskId unchanged (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.

@zhouyuan zhouyuan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[VL][UNIFFLE] Fix incorrect task attempt ID used for Uniffle block IDs

3 participants