wsry commented on a change in pull request #11351: [FLINK-16404][runtime] Avoid 
caching buffers for blocked input channels before barrier alignment
URL: https://github.com/apache/flink/pull/11351#discussion_r407160076
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/buffer/NetworkBuffer.java
 ##########
 @@ -639,4 +632,16 @@ public boolean isCompressed() {
        public void setCompressed(boolean isCompressed) {
                this.isCompressed = isCompressed;
        }
+
+       @Override
+       public DataType getDataType() {
+               return dataType;
+       }
+
+       @Override
+       public void setDataType(DataType dataType) {
+               ensureAccessible();
 
 Review comment:
   I copied this from tagAsEvent, IMO, ensureAccessible is not a must here and 
I checked the code, ensureAccessible method mainly checks about the reference 
count and ensures that the buffer is not recycled, so I  think it should be ok 
to keep this check.

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