Skip to content

Commit

Permalink
[FLINK-22127][network] Enrich error message of read buffer request ti…
Browse files Browse the repository at this point in the history
…meout to tell the user how to solve the problem when using sort-merge blocking shuffle

This closes apache#15499.
  • Loading branch information
wsry authored and guoweiM committed Apr 12, 2021
1 parent 562f31a commit cbf3c5f
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import org.apache.flink.annotation.VisibleForTesting;
import org.apache.flink.api.common.time.Deadline;
import org.apache.flink.configuration.TaskManagerOptions;
import org.apache.flink.core.memory.MemorySegment;
import org.apache.flink.runtime.io.disk.BatchShuffleReadBufferPool;
import org.apache.flink.runtime.io.network.buffer.BufferRecycler;
Expand Down Expand Up @@ -163,7 +164,11 @@ private Queue<MemorySegment> allocateBuffers(
}

if (numRequestedBuffers <= 0) {
throw new TimeoutException("Buffer request timeout.");
throw new TimeoutException(
String.format(
"Buffer request timeout, this means there is a fierce contention of"
+ " the batch shuffle read memory, please increase '%s'.",
TaskManagerOptions.NETWORK_BATCH_SHUFFLE_READ_MEMORY.key()));
}
} catch (Throwable throwable) {
// fail all pending subpartition readers immediately if any exception occurs
Expand Down

0 comments on commit cbf3c5f

Please sign in to comment.