AHeise commented on a change in pull request #12353:
URL: https://github.com/apache/flink/pull/12353#discussion_r435869219
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/api/writer/BroadcastRecordWriter.java
##########
@@ -84,7 +86,7 @@ void randomEmit(T record, int targetChannelIndex) throws
IOException, Interrupte
if (bufferBuilder != null) {
for (int index = 0; index < numberOfChannels; index++) {
if (index != targetChannelIndex) {
-
addBufferConsumer(bufferBuilder.createBufferConsumer(), index);
+
addBufferConsumer(randomTriggeredConsumer.copyAndSync(bufferBuilder), index);
Review comment:
I agree, but without the refactoring, I don't think we can avoid
spaghetti.
I'd suggest to do a refactoring as a separate task.
----------------------------------------------------------------
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]