Shenjiaqi commented on code in PR #20860:
URL: https://github.com/apache/flink/pull/20860#discussion_r990617300


##########
flink-runtime/src/main/java/org/apache/flink/runtime/state/memory/ByteStreamStateHandle.java:
##########
@@ -148,7 +148,7 @@ public int read(byte[] b, int off, int len) throws 
IOException {
                 index += bytesToCopy;
                 return bytesToCopy;
             } else {
-                return -1;
+                return len == 0 ? 0 : -1;

Review Comment:
   Since ByteStateHandleInputStream is only used in 
ByteStreamStateHandle#openInputStream, so I think influence of this change is 
limited.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to