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
  • Loading branch information
wsry committed Apr 7, 2021
1 parent 9cb1610 commit 87b826d
Showing 1 changed file with 6 additions and 1 deletion.
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 87b826d

Please sign in to comment.