danepitkin commented on code in PR #36934:
URL: https://github.com/apache/arrow/pull/36934#discussion_r1278075653


##########
java/dataset/src/main/java/org/apache/arrow/dataset/file/FileSystemDatasetFactory.java:
##########
@@ -26,14 +28,18 @@
  */
 public class FileSystemDatasetFactory extends NativeDatasetFactory {
 
+  private static final AtomicBoolean addedS3ShutdownHook = new 
AtomicBoolean(false);

Review Comment:
   I added an atomic check to ensure we only register a single hook. Without 
it, we could register multiple hooks to call `EnsureS3Finalized`. 



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

Reply via email to