Repository navigation
Conversation
…orker getTotalPendingBytes() derived pending bytes from MemoryManager.getMemoryUsage() (Netty usedDirectMemory + sort memory). Pooled Netty chunks are retained after their buffers are freed, so direct memory behaves as a high-water ratchet: once a load peak pushed it above the low watermark it stayed there even on a fully idle worker. checkCongestion()'s exit condition was therefore never satisfied, overHighWatermark stayed true forever, and the worker kept reporting highWorkload=true in heartbeats, leaving it permanently excluded by the master (CELEBORN-1782 chain). Track instead the bytes actually produced but not yet flushed - the disk flusher backlog (diskBufferCounter), memory-staged shuffle data (memoryFileStorageCounter) and in-flight sort memory (sortMemoryCounter) - all of which decay to zero on an idle worker and match the documented semantics of the diskBuffer watermarks.
yew1eb
force-pushed
the
CELEBORN-2600
branch
from
November 23, 2026 09:20
f5f8a99 to
ec2ea77
Compare
Contributor
Author
This branch has not been deployed
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 were proposed in this pull request?
CongestionController.getTotalPendingBytes()now returns the bytes actually produced but not yet flushed —diskBufferCounter(disk flusher backlog) +memoryFileStorageCounter(memory-staged shuffle data) +sortMemoryCounter(in-flight sort memory) — instead ofMemoryManager.getMemoryUsage()(NettyusedDirectMemory+ sort memory).Why are the changes needed?
checkCongestion()exits congestion only whengetTotalPendingBytes() < diskBufferLowWatermark && produceSpeed < produceSpeedLowWatermark. The old implementation derived pending bytes from NettyusedDirectMemory, which behaves as a high-water ratchet: pooled Netty chunks are retained after their buffers are freed, so after a load peak the metric plateaus near the peak even on a fully idle worker.Observed on a 6-worker test cluster (v0.6.2,
celeborn.worker.congestionControl.diskBuffer.high/low.watermark = 2600MB/2000MB): once a worker crossed the high watermark during peak shuffle load,WorkerCongested,IsHighWorkload(worker side) andExcludedWorkerCount(master side) never recovered after all jobs finished. The exit condition was never satisfied,overHighWatermarkstayedtrueforever, and the worker kept reportinghighWorkload=truein every heartbeat, leaving it permanently in the master'sexcludedWorkers(CELEBORN-1782 chain). Only restarting the worker process cleared the exclusion.Idle-worker evidence (MemoryManager periodic report — all real pending counters at zero while direct memory is still above the low watermark):
Does this PR resolve a correctness bug?
Does this PR introduce any user-facing change?
How was this patch tested?
TestCongestionController(all pre-existing tests overridegetTotalPendingBytes(), so the real implementation was previously untested):testTotalPendingBytesTracksUnflushedBuffers: pending bytes count the flusher backlog, memory-staged data and sort memory, and return to baseline once released — independent of retained Netty direct memory.testCongestionExitsAfterAllBuffersReleased: after pending bytes cross the high watermark, congestion exits once the buffers are flushed.