pnowojski commented on a change in pull request #17238:
URL: https://github.com/apache/flink/pull/17238#discussion_r709963217
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/netty/CreditBasedSequenceNumberingViewReader.java
##########
@@ -240,7 +240,9 @@ public Throwable getFailureCause() {
@Override
public void releaseAllResources() throws IOException {
- subpartitionView.releaseAllResources();
+ if (subpartitionView != null) {
+ subpartitionView.releaseAllResources();
+ }
Review comment:
? I'm confused by this change and the commit message. How is it related
to FLINK-9057?
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/netty/PartitionRequestServerHandler.java
##########
@@ -82,16 +82,17 @@ protected void channelRead0(ChannelHandlerContext ctx,
NettyMessage msg) throws
LOG.debug("Read channel on {}: {}.",
ctx.channel().localAddress(), request);
+ // Always register reader before requesting the subpartition
in order to
+ // subsequent requests will be sure that PartitionRequest was
received already
+ // even if subpartition view has not created yet.
+ NetworkSequenceViewReader reader =
+ outboundQueue.notifyReaderCreated(
+ new CreditBasedSequenceNumberingViewReader(
+ request.receiverId, request.credit,
outboundQueue));
Review comment:
Won't this cause resource leaks? What if `PartitionRequest` never
succeeds and `allReaders.remove(toCancel);` in
`org.apache.flink.runtime.io.network.netty.PartitionRequestQueue#userEventTriggered`
never happens?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]