flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [flink] tzulitai commented on a change in pull request #14042: [FLINK-19300][flink-core] Fix input stream read to prevent heap based timer loss
Date Fri, 13 Nov 2020 07:52:32 GMT

tzulitai commented on a change in pull request #14042:
URL: https://github.com/apache/flink/pull/14042#discussion_r522749182



##########
File path: flink-core/src/main/java/org/apache/flink/core/io/PostVersionedIOReadableWritable.java
##########
@@ -62,16 +62,23 @@ public void write(DataOutputView out) throws IOException {
 	 */
 	public final void read(InputStream inputStream) throws IOException {
 		byte[] tmp = new byte[VERSIONED_IDENTIFIER.length];
-		inputStream.read(tmp);
+		int totalRead = 0;

Review comment:
       @igalshilman just reminded me:
   even better, can you add this read logic as a new `tryReadFully` method to `org.apache.flink.util.IOUtils`?
That would be a good place for this to be.




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



Mime
View raw message