You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/04/12 07:35:10 UTC

[GitHub] [flink] wsry commented on a change in pull request #11351: [FLINK-16404][runtime] Avoid caching buffers for blocked input channels before barrier alignment

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:
users@infra.apache.org


With regards,
Apache Git Services