Skip to content

[CELEBORN-2569] Require positive push buffer sizes - #3986

Open
huangxiaopingRD wants to merge 4 commits into
apache:mainfrom
huangxiaopingRD:fix-hash-buffer-growth
Open

huangxiaopingRD wants to merge 4 commits into
apache:mainfrom
huangxiaopingRD:fix-hash-buffer-growth

Conversation

@huangxiaopingRD

@huangxiaopingRD huangxiaopingRD commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Require celeborn.client.push.buffer.initial.size and celeborn.client.push.buffer.max.size to be positive, including when set through its legacy alias. Add configuration regression coverage for zero/negative values, positive values, and the default.

Update the three barrier-stage integration tests to use a one-byte maximum push buffer, preserving their direct giant-record push behavior with a valid positive size.

Why are the changes needed?

With an initial buffer size of 0 and a positive maximum, writing a non-empty record that fits within the maximum repeatedly doubles a zero-length buffer. The task remains in the growth loop indefinitely. Rejecting zero at configuration validation prevents this condition. Also require a positive maximum buffer size: zero sends every non-empty Spark record through the giant-record path, bypassing buffering, while negative values can cause buffer allocation failures.

JIRA: https://issues.apache.org/jira/browse/CELEBORN-2569

Does this PR resolve a correctness bug?

  • Yes

Does this PR introduce any user-facing change?

  • Yes

Zero and negative initial or maximum push buffer sizes now fail configuration validation with Initial push buffer size must be positive. or Maximum push buffer size must be positive., respectively.

How was this patch tested?

  • Confirmed the new configuration regression test fails before the fix because zero is accepted.
  • CelebornConfSuite: 35 tests passed.
  • Spotless and git diff --check passed.
  • Spark 4.2.0 / Scala 2.13.18 / JDK 17: CelebornFetchFailureSuite passed all 9 tests, including the three barrier-stage regression cases.

@github-actions github-actions Bot added correctness Correctness bugfix module:client module:spark module:common and removed correctness Correctness bugfix labels Nov 19, 2026
@huangxiaopingRD huangxiaopingRD changed the title [CELEBORN-2569] Prevent hash writer from looping with a zero initial buffer [CELEBORN-2569] Require a positive initial push buffer size Nov 19, 2026
@github-actions github-actions Bot added correctness Correctness bugfix and removed module:client module:spark labels Nov 19, 2026
@huangxiaopingRD huangxiaopingRD changed the title [CELEBORN-2569] Require a positive initial push buffer size [CELEBORN-2569] Require positive push buffer sizes Nov 19, 2026
@github-actions github-actions Bot removed the correctness Correctness bugfix label Nov 20, 2026
@codecov

codecov Bot commented Nov 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.94%. Comparing base (dfdada3) to head (8777fee).
⚠️ Report is 16 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3986      +/-   ##
============================================
+ Coverage     62.64%   62.94%   +0.30%     
  Complexity      451      451              
============================================
  Files           407      407              
  Lines         29032    29037       +5     
  Branches       2858     2863       +5     
============================================
+ Hits          18185    18273      +88     
+ Misses         9467     9379      -88     
- Partials       1380     1385       +5     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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