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_r356442618
##########
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:
We might supplement some descriptions for this method to warn that only
shareable `BufferConsumer` can support `copy` function.
----------------------------------------------------------------
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