dawidwys commented on a change in pull request #17440:
URL: https://github.com/apache/flink/pull/17440#discussion_r732474755
##########
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:
Did you investigate if we need to submit it through the `eventLoop` or
would it be enough to call
`tcpChannel.pipeline().fireUserEventTriggered(message)`?
--
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]