gaoyunhaii commented on a change in pull request #8925: [FLINK-12852][network]
Fix the deadlock occured when requesting exclusive buffers
URL: https://github.com/apache/flink/pull/8925#discussion_r302353455
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/buffer/NetworkBufferPool.java
##########
@@ -73,17 +75,31 @@
private final int numberOfSegmentsToRequest;
+ private final long requestSegmentsTimeoutInMillis;
+
+ public NetworkBufferPool(int numberOfSegmentsToAllocate, int
segmentSize, int numberOfSegmentsToRequest) {
+ this(numberOfSegmentsToAllocate, segmentSize,
numberOfSegmentsToRequest, Integer.MAX_VALUE);
+ }
+
/**
* Allocates all {@link MemorySegment} instances managed by this pool.
*/
- public NetworkBufferPool(int numberOfSegmentsToAllocate, int
segmentSize, int numberOfSegmentsToRequest) {
+ public NetworkBufferPool(
+ int numberOfSegmentsToAllocate,
+ int segmentSize,
+ int numberOfSegmentsToRequest,
+ long requestSegmentsTimeoutInMillis) {
Review comment:
Agree with that an encapsulated object should be more clear and changed the
related variables to Duration in `NettyShuffleEnvironmentConfiguration`,
`NetworkBufferPool` and `NettyShuffleEnvironmentBuilder`.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services