reswqa commented on code in PR #24717:
URL: https://github.com/apache/flink/pull/24717#discussion_r1579092286
##########
flink-core/src/main/java/org/apache/flink/api/java/typeutils/runtime/NoFetchingInput.java:
##########
@@ -114,18 +121,26 @@ public void readBytes(byte[] bytes, int offset, int
count) throws KryoException
throw new IllegalArgumentException("bytes cannot be null.");
}
+ if (count == 0) {
+ return;
+ }
+
try {
int bytesRead = 0;
int c;
- while (bytesRead < count) {
+ while (true) {
c = inputStream.read(bytes, offset + bytesRead, count -
bytesRead);
if (c == -1) {
throw new KryoException(new EOFException("No more bytes
left."));
}
bytesRead += c;
+
+ if (bytesRead == count) {
Review Comment:
Thanks! Yes, I don't know the details also, but it's possible that JIT
optimizations were affected.
--
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]