ahmarsuhail commented on code in PR #14329:
URL: https://github.com/apache/iceberg/pull/14329#discussion_r2430081080
##########
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:
Since this is quite low level, and depends on the HTTP client implementation
I haven't been able to find a clear answer yet. but agree on not making the
getLength() call just for this, my understanding was that the length would
already be available at this point.
--
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]