akalash commented on a change in pull request #17440:
URL: https://github.com/apache/flink/pull/17440#discussion_r732611368



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/netty/NettyPartitionRequestClient.java
##########
@@ -195,22 +195,26 @@ public void operationComplete(ChannelFuture future) 
throws Exception {
 
     @Override
     public void notifyCreditAvailable(RemoteInputChannel inputChannel) {
-        clientHandler.notifyCreditAvailable(inputChannel);
+        sendToChannel(new AddCreditMessage(inputChannel));
     }
 
     @Override
     public void notifyNewBufferSize(RemoteInputChannel inputChannel, int 
bufferSize) {
-        clientHandler.notifyNewBufferSize(inputChannel, bufferSize);
+        sendToChannel(new NewBufferSizeMessage(inputChannel, bufferSize));
     }
 
     @Override
     public void resumeConsumption(RemoteInputChannel inputChannel) {
-        clientHandler.resumeConsumption(inputChannel);
+        sendToChannel(new ResumeConsumptionMessage(inputChannel));
     }
 
     @Override
     public void acknowledgeAllRecordsProcessed(RemoteInputChannel 
inputChannel) {
-        clientHandler.acknowledgeAllRecordsProcessed(inputChannel);
+        sendToChannel(new AcknowledgeAllRecordsProcessedMessage(inputChannel));
+    }
+
+    private void sendToChannel(ClientOutboundMessage message) {
+        tcpChannel.eventLoop().execute(() -> 
tcpChannel.pipeline().fireUserEventTriggered(message));

Review comment:
       Yes, I did. Before these changes, we always submitted it through the 
`evenLoop` so I don't see a reason why we should change that




-- 
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]


Reply via email to