pnowojski 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_r355571602
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/buffer/BufferConsumer.java
 ##########
 @@ -44,6 +44,9 @@
 
        private int currentReaderPosition;
 
+       /** Whether this BufferConsumer is copied from another BufferConsumer 
instance. */
+       private final boolean isCopied;
 
 Review comment:
   > if have more time to think through, then we can avoid bringing this tag 
field in BufferConsumer. 
   
   I think we can always refactor it in the future, if there will be such need.
   
   >  That is why I suggested supporting the compression only for batch jobs 
for nearly release, and make it also ready for streaming job in future.
   
   As discussed offline, I think the only argument to drop pipelined 
compression for now would be, if we do not want the pipelined compression 
happen on this level at all. For example if we wanted to just just Netty's 
built-in compression. If we release the code as it is now, then if we will 
change our minds to re-implement pipelined compression in netty, we would brake 
the config options compatibility.
   
   All in all, I think the cost of the current implementation, with the 
existing limitation "compression not working for broadcasting", is relatively 
low, so I would be inclined to keep it more or less as it is.
   
   The one change that I would request is to fix this "first buffer consumer 
issue", by changing the `isCopied` flag, to `isCopyable`, which would be set to 
"true/false" even for the first `BufferConsumer`. If the `BufferConsumer` is 
copyable, we can not compress it.

----------------------------------------------------------------
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

Reply via email to