Skip to content

Commit

Permalink
[FLINK-35215][core] Fix the bug when Kryo serialize length is 0
Browse files Browse the repository at this point in the history
Re-implement to avoid the performance regression
  • Loading branch information
1996fanrui committed May 8, 2024
1 parent 6b0f697 commit ba2740f
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ 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;
Expand Down

0 comments on commit ba2740f

Please sign in to comment.