pnowojski commented on a change in pull request #11687: URL: https://github.com/apache/flink/pull/11687#discussion_r419945189
########## File path: flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/BufferManager.java ########## @@ -65,14 +65,10 @@ @GuardedBy("bufferQueue") private int numRequiredBuffers; - public BufferManager( - MemorySegmentProvider globalPool, - InputChannel inputChannel, - int numRequiredBuffers) { - - this.globalPool = checkNotNull(globalPool); - this.inputChannel = checkNotNull(inputChannel); + public BufferManager(InputChannel inputChannel, int numRequiredBuffers) { checkArgument(numRequiredBuffers >= 0); + this.inputChannel = checkNotNull(inputChannel); + this.globalPool = inputChannel.inputGate.getMemorySegmentProvider(); Review comment: I think it would be better to limit the reliance on this faulty cyclic dependency. That way it will be easier to get rid of it in the future. ---------------------------------------------------------------- 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: us...@infra.apache.org