ahmarsuhail commented on code in PR #14329:
URL: https://github.com/apache/iceberg/pull/14329#discussion_r2430069004
##########
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:
@danielcweeks if we remove the `read()`, and then also don't do the
`remainingInCurrentRequest()`, then will `abort()` the stream, even when we're
at EoF. From what I understand, calling abort() removes the connection, and
close() allows for the connection reuse.
What is not clear to me is if the same behaviour holds if you're at EoF.
What I would like to avoid is removing connections from the pool, when they
could be re-used.
I am trying to confirm the above behaviour with the AWS SDK team, but do let
me know if you have any advice here.
--
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]