nastra commented on code in PR #14329:
URL: https://github.com/apache/iceberg/pull/14329#discussion_r2432852967


##########
aws/src/main/java/org/apache/iceberg/aws/s3/S3InputStream.java:
##########
@@ -278,14 +289,18 @@ private void closeStream(boolean closeQuietly) throws 
IOException {
 
   private void abortStream() {
     try {
-      if (stream instanceof Abortable && stream.read() != -1) {
+      if (stream instanceof Abortable && remainingInCurrentRequest() > 0) {

Review Comment:
   To add some historical context on why the `stream.read() != -1` was added: 
https://github.com/apache/iceberg/pull/7262#issuecomment-1493425388
   
   I think we should keep the read there and just remove the noisy warning 
messages as @bryanck already called out in 
https://github.com/apache/iceberg/pull/7262#discussion_r1155343093



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to