You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/02/14 09:27:55 UTC
[GitHub] [flink] KarmaGYZ commented on a change in pull request #18417: [FLINK-15455][network] Enabled tcp connection reuse across multi jobs.
KarmaGYZ commented on a change in pull request #18417:
URL: https://github.com/apache/flink/pull/18417#discussion_r805648663
##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/io/network/netty/NettyPartitionRequestClient.java
##########
@@ -222,22 +227,33 @@ public void close(RemoteInputChannel inputChannel) throws IOException {
clientHandler.removeInputChannel(inputChannel);
- if (closeReferenceCounter.decrement()) {
- // Close the TCP connection. Send a close request msg to ensure
- // that outstanding backwards task events are not discarded.
- tcpChannel
- .writeAndFlush(new NettyMessage.CloseRequest())
- .addListener(ChannelFutureListener.CLOSE_ON_FAILURE);
-
- // Make sure to remove the client from the factory
- clientFactory.destroyPartitionRequestClient(connectionId, this);
+ if (closeReferenceCounter.getAndUpdate(count -> count > 0 ? count - 1 : count) == 1
+ && !canBeReused()) {
Review comment:
I don't think so. We close the connection only the first time the counter reaches zero.
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org