zhijiangW commented on a change in pull request #12353:
URL: https://github.com/apache/flink/pull/12353#discussion_r432575584
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/api/writer/BroadcastRecordWriter.java
##########
@@ -130,7 +132,7 @@ public BufferBuilder requestNewBufferBuilder(int
targetChannel) throws IOExcepti
BufferBuilder builder =
super.requestNewBufferBuilder(targetChannel);
if (randomTriggered) {
- addBufferConsumer(builder.createBufferConsumer(),
targetChannel);
+ addBufferConsumer(randomConsumer =
builder.createBufferConsumer(), targetChannel);
Review comment:
Yeah, your thought is right. But my concern is that the current changes
would make the latency marker visible for all the channels, not only for one
random channel if my understanding is right.
I mean the current created `randomConsumer` should have `0` reader position,
then all the copies should also have the `0` reader position, which means they
can read the latency marker because it is filled in the `BufferBuilder`
afterwards.
I guess the proper way might be we only create one consumer for the random
channel before filling the latency marker. After that, we create/copy the
separate consumers with increased references for all the left channels, then
the reader position for these copied consumers should overtake the length of
latency marker?
----------------------------------------------------------------
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]