-
Notifications
You must be signed in to change notification settings - Fork 2.9k
AWS: Close the S3SeekableInputStreamFactory before removing from cache #12891
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
aws/src/main/java/org/apache/iceberg/aws/s3/AnalyticsAcceleratorUtil.java
Show resolved
Hide resolved
rajdchak
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before invalidating the factories from the cache also we should close the factories.
|
@HonahX @kevinjqliu May I request for a review on this PR please? |
| return new S3SeekableInputStreamFactory(objectClient, streamConfiguration); | ||
| } | ||
|
|
||
| private static void handleRemoval(S3SeekableInputStreamFactory factory) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can probably just be inlined, otherwise the naming of the method is a bit misleading, because we're not handling removal inside the method but closing the factory. Alternatively just rename the method to close(..)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, I'll update it to close then.
074bf77 to
ee79314
Compare
Current integration with the S3 Analytics Accelerator Library ( #12299 ) is not closing the
S3SeekableInputStreamFactoryonS3FileIOclose. This PR incorporates that logic by closing it before removing from cache.