gaborgsomogyi commented on code in PR #28012:
URL: https://github.com/apache/flink/pull/28012#discussion_r3138321139


##########
flink-filesystems/flink-s3-fs-native/src/main/java/org/apache/flink/fs/s3native/NativeS3InputStream.java:
##########
@@ -164,6 +175,22 @@ private void openStreamAtCurrentPosition() throws 
IOException {
         }
     }
 
+    /**
+     * Aborts the in-flight HTTP connection so that subsequent {@code close()} 
calls on the stream
+     * do not drain remaining bytes over the network.
+     *
+     * @see ResponseInputStream#abort()
+     */
+    private void abortCurrentStream() {
+        if (currentStream != null) {

Review Comment:
   If `currentStream` is guarded then the function must guard it. Otherwise a 
simple lock move from upper call will break things silently



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