Skip to content

[CELEBORN-2599] Fix C++ shuffle batch deduplication for interleaved m… - #4004

Open
SparksFyz wants to merge 1 commit into
apache:mainfrom
SparksFyz:fyz/CELEBORN-2599
Open

SparksFyz wants to merge 1 commit into
apache:mainfrom
SparksFyz:fyz/CELEBORN-2599

Conversation

@SparksFyz

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Update CelebornInputStream::getBatchRecord() to grow batchRecords_ only when the incoming map ID needs a new slot. Add a regression test for duplicate batches from interleaved mappers.

Why are the changes needed?

When the reader encounters a smaller map ID, the unconditional resize() can shrink the vector and erase deduplication records for larger map IDs. If a batch from one of those mappers is replayed, the reader can return it twice.

CELEBORN-2599

Does this PR resolve a correctness bug?

  • Yes

Does this PR introduce any user-facing change?

  • []

How was this patch tested?

The unit test feeds the reader (map 1, batch 0), (map 0, batch 0), a replay of (map 1, batch 0), and then (map 1, batch 1). It verifies that the reader skips the replay and returns all three distinct batches in order.

…ap IDs

  Reading a batch with a smaller map ID could shrink the batch record
  vector and discard entries for larger map IDs. A replayed batch from
  one of those mappers could then be returned twice.

  Grow the vector only when the incoming map ID needs a new slot. Add a
  regression test that interleaves two map IDs, replays a batch, and
  verifies that the reader skips the replay and returns the next batch.
@github-actions github-actions Bot added correctness Correctness bugfix module:cpp labels Nov 23, 2026

This branch has not been deployed

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

Labels

correctness Correctness bugfix module:cpp

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant