Skip to content

[CELEBORN-2567][MR] Handle records exceeding remaining sort buffer - #3985

Open
huangxiaopingRD wants to merge 1 commit into
apache:mainfrom
huangxiaopingRD:fix-mr-sort-buffer-exhaustion
Open

huangxiaopingRD wants to merge 1 commit into
apache:mainfrom
huangxiaopingRD:fix-mr-sort-buffer-exhaustion

Conversation

@huangxiaopingRD

@huangxiaopingRD huangxiaopingRD commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

When the MR sort buffer fills while serializing a record, push the completed records and move the partial record to the start of the buffer so that serialization can continue. Preserve the existing error for a single record larger than the buffer.

Why are the changes needed?

The spill threshold is checked before serialization. For example, with a 10-byte buffer and a 9-byte spill threshold, a 7-byte record followed by a 5-byte record fails with Sort pusher memory exhausted, even though the second record fits in an empty buffer.

Does this PR resolve a correctness bug?

  • Yes

Does this PR introduce any user-facing change?

  • Yes

MR jobs no longer fail in this buffer-boundary case. Records larger than the entire buffer still fail as before.

How was this patch tested?

  • Maven reactor build and targeted CelebornSortBasedPusherSuiteJ: 7 tests passed, covering key/value serialization boundaries, sorted payloads, exact capacity, oversized records, and push failure propagation.
  • MR module Spotless check.
  • The boundary tests were also run against the original code and reproduced the failure.

No real MR cluster test was performed.

@huangxiaopingRD
huangxiaopingRD force-pushed the fix-mr-sort-buffer-exhaustion branch from 6f1e451 to bf6d935 Compare November 20, 2026 10:53
@github-actions github-actions Bot removed the correctness Correctness bugfix label Nov 20, 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant