zhijiangW commented on a change in pull request #10492: [FLINK-15140][runtime]
Fix shuffle data compression doesn't work with BroadcastRecordWriter.
URL: https://github.com/apache/flink/pull/10492#discussion_r356441741
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/buffer/BufferConsumer.java
##########
@@ -115,7 +131,8 @@ public Buffer build() {
* @return a retained copy of self with separate indexes
*/
public BufferConsumer copy() {
- return new BufferConsumer(buffer.retainBuffer(),
writerPosition.positionMarker, currentReaderPosition);
+ checkState(isShareable, "The underlying buffer is not
shareable.");
Review comment:
From this point, my previous concern of whether the `isShareable` tag is
indicating for both buffer & event and only for buffer might have the answer.
The semantic should be covering both buffer and event, otherwise the event copy
would destroy this check, although the event shareable would not be used in
practice atm.
----------------------------------------------------------------
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]
With regards,
Apache Git Services