pitrou opened a new pull request, #36442:
URL: https://github.com/apache/arrow/pull/36442

   ### Rationale for this change
   
   It is required to call `FinalizeS3` at process end to cleanly shut down 
resources used by the AWS SDK before it's too late.
   However, once `FinalizeS3` has been called, another problem appears: no AWS 
SDK API can be called safely anymore. Even object destructors can be dangerous.
   We therefore need a way to prevent unsafe use of the AWS SDK APIs, 
regardless of how the application issues filesystems calls.
   
   ### What changes are included in this PR?
   
   Shield all uses of the internal `S3Client` class behind a safe RAII facility 
`S3ClientLock`. Obtaining a `S3ClientLock` ensures that S3 finalization has not 
been called yet _and_ that it will not be called until the `S3ClientLock` goes 
out of scope.
   
   ### Are these changes tested?
   
   Yes, some Python tests exercise calling S3 APIs after explicit finalization.
   
   ### Are there any user-facing changes?
   
   Not for correctly written application code, ideally.
   


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