You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@celeborn.apache.org by "SteNicholas (via GitHub)" <gi...@apache.org> on 2025/11/03 08:38:02 UTC
[PR] [CELEBORN-2192] ReadBufferDispatcher should add timeout constraints to fast fail in case of timeout [celeborn]
SteNicholas opened a new pull request, #3525:
URL: https://github.com/apache/celeborn/pull/3525
### What changes were proposed in this pull request?
`ReadBufferDispatcher` should add timeout constraints to fast fail in case of timeout.
### Why are the changes needed?
Setting `celeborn.worker.directMemoryRatioForReadBuffer` with small ratio may result in a backlog of read buffer requests for `ReadBufferDispatcher` at present, which causes running flink jobs to stall. `ReadBufferDispatcher` should add timeout constraints to fast fail in case of timeout, avoiding long wait times for client.
### Does this PR resolve a correctness bug?
No.
### Does this PR introduce _any_ user-facing change?
Introduce `celeborn.worker.readBuffer.processTimeout` config to specify timeout for buffer dispatcher to process a read buffer request.
### How was this patch tested?
`ReadBufferDispactherSuite#[CELEBORN-2192] ReadBufferDispatcher should add timeout constraints to fast fail in case of timeout`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CELEBORN-2192] ReadBufferDispatcher should add timeout constraints to fast fail in case of timeout [celeborn]
Posted by "RexXiong (via GitHub)" <gi...@apache.org>.
RexXiong commented on code in PR #3525:
URL: https://github.com/apache/celeborn/pull/3525#discussion_r2488960587
##########
common/src/main/scala/org/apache/celeborn/common/CelebornConf.scala:
##########
@@ -4429,6 +4430,14 @@ object CelebornConf extends Logging {
.timeConf(TimeUnit.MILLISECONDS)
.createWithDefaultString("50ms")
+ val WORKER_READBUFFER_PROCESS_TIMEOUT: ConfigEntry[Long] =
+ buildConf("celeborn.worker.readBuffer.processTimeout")
+ .categories("worker")
+ .version("0.7.0")
Review Comment:
Maybe we can cherry pick this pr to 0.6, WDYT?
##########
worker/src/test/scala/org/apache/celeborn/service/deploy/memory/ReadBufferDispactherSuite.scala:
##########
@@ -75,4 +75,32 @@ class ReadBufferDispactherSuite extends CelebornFunSuite {
val threadId2 = readBufferDispatcher.dispatcherThread.get().getId
assert(threadId1 != threadId2)
}
+
+ test("[CELEBORN-2192] ReadBufferDispatcher should add timeout constraints to fast fail in case of timeout") {
+ val memoryManager = mock(classOf[MemoryManager])
+ val readBufferDispatcher = new ReadBufferDispatcher(
+ memoryManager,
+ new CelebornConf().set(
+ CelebornConf.WORKER_READBUFFER_PROCESS_TIMEOUT.key,
+ CelebornConf.WORKER_READBUFFER_ALLOCATIONWAIT.defaultValueString),
+ null)
+ when(memoryManager.readBufferAvailable(anyInt())).thenAnswer(new Answer[Boolean] {
+ override def answer(invocationOnMock: InvocationOnMock): Boolean = false
+ })
+ val completableFuture = new CompletableFuture[Void]()
+ val readBufferRequest = new ReadBufferRequest(
+ Integer.MAX_VALUE,
+ Integer.MAX_VALUE,
+ new ReadBufferListener {
+ override def notifyBuffers(
+ allocatedBuffers: util.List[ByteBuf],
+ throwable: Throwable): Unit = {
+ assert(throwable != null)
Review Comment:
It seems that we cannot currently determine whether notifyBuffers has been executed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CELEBORN-2192] ReadBufferDispatcher should add timeout constraints to fast fail in case of timeout [celeborn]
Posted by "SteNicholas (via GitHub)" <gi...@apache.org>.
SteNicholas commented on code in PR #3525:
URL: https://github.com/apache/celeborn/pull/3525#discussion_r2490282517
##########
worker/src/test/scala/org/apache/celeborn/service/deploy/memory/ReadBufferDispactherSuite.scala:
##########
@@ -75,4 +75,32 @@ class ReadBufferDispactherSuite extends CelebornFunSuite {
val threadId2 = readBufferDispatcher.dispatcherThread.get().getId
assert(threadId1 != threadId2)
}
+
+ test("[CELEBORN-2192] ReadBufferDispatcher should add timeout constraints to fast fail in case of timeout") {
+ val memoryManager = mock(classOf[MemoryManager])
+ val readBufferDispatcher = new ReadBufferDispatcher(
+ memoryManager,
+ new CelebornConf().set(
+ CelebornConf.WORKER_READBUFFER_PROCESS_TIMEOUT.key,
+ CelebornConf.WORKER_READBUFFER_ALLOCATIONWAIT.defaultValueString),
+ null)
+ when(memoryManager.readBufferAvailable(anyInt())).thenAnswer(new Answer[Boolean] {
+ override def answer(invocationOnMock: InvocationOnMock): Boolean = false
+ })
+ val completableFuture = new CompletableFuture[Void]()
+ val readBufferRequest = new ReadBufferRequest(
+ Integer.MAX_VALUE,
+ Integer.MAX_VALUE,
+ new ReadBufferListener {
+ override def notifyBuffers(
+ allocatedBuffers: util.List[ByteBuf],
+ throwable: Throwable): Unit = {
+ assert(throwable != null)
Review Comment:
@RexXiong, invoking `completableFuture#complete` could determine whether `notifyBuffers` is executed. If `notifyBuffers` is not executed, `completableFuture#get` would timeout.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CELEBORN-2192] ReadBufferDispatcher should add timeout constraints to fast fail in case of timeout [celeborn]
Posted by "SteNicholas (via GitHub)" <gi...@apache.org>.
SteNicholas commented on code in PR #3525:
URL: https://github.com/apache/celeborn/pull/3525#discussion_r2490276375
##########
common/src/main/scala/org/apache/celeborn/common/CelebornConf.scala:
##########
@@ -4429,6 +4430,14 @@ object CelebornConf extends Logging {
.timeConf(TimeUnit.MILLISECONDS)
.createWithDefaultString("50ms")
+ val WORKER_READBUFFER_PROCESS_TIMEOUT: ConfigEntry[Long] =
+ buildConf("celeborn.worker.readBuffer.processTimeout")
+ .categories("worker")
+ .version("0.7.0")
Review Comment:
Yes. This improvement could cherry pick to branch-0.6. Therefore, this version could be 0.6.1.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CELEBORN-2192] ReadBufferDispatcher should add timeout constraints to fast fail in case of timeout [celeborn]
Posted by "SteNicholas (via GitHub)" <gi...@apache.org>.
SteNicholas commented on PR #3525:
URL: https://github.com/apache/celeborn/pull/3525#issuecomment-3479611155
Ping @FMX, @RexXiong.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CELEBORN-2192] ReadBufferDispatcher should add timeout constraints to fast fail in case of timeout [celeborn]
Posted by "SteNicholas (via GitHub)" <gi...@apache.org>.
SteNicholas commented on code in PR #3525:
URL: https://github.com/apache/celeborn/pull/3525#discussion_r2490276375
##########
common/src/main/scala/org/apache/celeborn/common/CelebornConf.scala:
##########
@@ -4429,6 +4430,14 @@ object CelebornConf extends Logging {
.timeConf(TimeUnit.MILLISECONDS)
.createWithDefaultString("50ms")
+ val WORKER_READBUFFER_PROCESS_TIMEOUT: ConfigEntry[Long] =
+ buildConf("celeborn.worker.readBuffer.processTimeout")
+ .categories("worker")
+ .version("0.7.0")
Review Comment:
@RexXiong, yes. This improvement could cherry pick to branch-0.6. Therefore, this version could be 0.6.1.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CELEBORN-2192] ReadBufferDispatcher should add timeout constraints to fast fail in case of timeout [celeborn]
Posted by "RexXiong (via GitHub)" <gi...@apache.org>.
RexXiong closed pull request #3525: [CELEBORN-2192] ReadBufferDispatcher should add timeout constraints to fast fail in case of timeout
URL: https://github.com/apache/celeborn/pull/3525
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CELEBORN-2192] ReadBufferDispatcher should add timeout constraints to fast fail in case of timeout [celeborn]
Posted by "RexXiong (via GitHub)" <gi...@apache.org>.
RexXiong commented on PR #3525:
URL: https://github.com/apache/celeborn/pull/3525#issuecomment-3488890730
Merge to main(v0.7.0) and branch-0.6(v0.6.2)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org