kbendick commented on a change in pull request #2878:
URL: https://github.com/apache/iceberg/pull/2878#discussion_r704940786
##########
File path: aws/src/main/java/org/apache/iceberg/aws/s3/S3FileIO.java
##########
@@ -105,4 +107,14 @@ public void initialize(Map<String, String> properties) {
this.awsClientFactory = AwsClientFactories.from(properties);
this.s3 = awsClientFactory::s3;
}
+
+ @Override
+ public void close() {
+ // handles concurrent calls to close()
+ if (isResourceClosed.compareAndSet(false, true)) {
+ if (client != null) {
+ client.close();
+ }
Review comment:
If this is checking for null (plus the compareAndSet), should it set it
to null as well or is the AtomicBoolean sufficient?
--
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]