Samrat002 commented on code in PR #28012:
URL: https://github.com/apache/flink/pull/28012#discussion_r3139695781
##########
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:
Good catch — @GuardedBy("lock") is only a static-analysis hint and doesn't
actually enforce anything at runtime, so your "silent break on a lock move"
scenario was real.
I've added a runtime precondition at the top of both @GuardedBy helpers
(abortCurrentStream() and releaseStreams())
--
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]