AHeise commented on a change in pull request #11507: [FLINK-16587] Add basic CheckpointBarrierHandler for unaligned checkpoint URL: https://github.com/apache/flink/pull/11507#discussion_r406234229
########## File path: flink-runtime/src/main/java/org/apache/flink/runtime/io/network/api/writer/RecordWriter.java ########## @@ -153,13 +153,17 @@ protected boolean copyFromSerializerToTargetChannel(int targetChannel) throws IO return pruneTriggered; } - public void broadcastEvent(AbstractEvent event) throws IOException { + public void broadcastEvent(AbstractEvent event, boolean isPriorityEvent) throws IOException { try (BufferConsumer eventBufferConsumer = EventSerializer.toBufferConsumer(event)) { for (int targetChannel = 0; targetChannel < numberOfChannels; targetChannel++) { tryFinishCurrentBufferBuilder(targetChannel); - // Retain the buffer so that it can be recycled by each channel of targetPartition - targetPartition.addBufferConsumer(eventBufferConsumer.copy(), targetChannel); + if (isPriorityEvent) { + targetPartition.addPriorityEvent(event, targetChannel, eventBufferConsumer); Review comment: I actually reverted back to the POC way where `PriorityEventListener` is only scoped to `LocalInputChannel`. That also means that currently only `BufferConsumers` are copied in the way that you both suggested. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services