AHeise commented on a change in pull request #15716:
URL: https://github.com/apache/flink/pull/15716#discussion_r618964330
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/SingleInputGate.java
##########
@@ -730,6 +730,12 @@ private BufferOrEvent transformEvent(
if (event.getClass() == EndOfPartitionEvent.class) {
channelsWithEndOfPartitionEvents.set(currentChannel.getChannelIndex());
+ synchronized (inputChannelsWithData) {
+
enqueuedInputChannelsWithData.clear(currentChannel.getChannelIndex());
+ if (inputChannelsWithData.contains(currentChannel)) {
+ inputChannelsWithData.getAndRemove(channel -> channel ==
currentChannel);
+ }
+ }
Review comment:
I'd put it below `currentChannel.releaseAllResources()`:
- This method is called from task thread, so there is no risk in concurrent
`getNextBuffer`.
- A concurrent `queueChannel` may come after this block and before
`releaseAllResources`.
--
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:
[email protected]