Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GH-39897: [C++][FS][S3] Ensure
AwsInstance::EnsureInitialized
to do…
… initialization exactly once under concurrency (#40110) ### Rationale for this change `FileSystemFromUri` could be called concurrently, and its implicit call to `AwsInstance::EnsureInitialized` will cause segment fault due to data race. Therefore, make init stage thread-safe for `AwsInstance::EnsureInitialized`. ### What changes are included in this PR? Serialize calls to S3 initialization to ensure initialization is done exactly once. ### Are these changes tested? Yes, a test is added for the PyArrow bindings. ### Are there any user-facing changes? No. * Closes: #39897 * GitHub Issue: #39897 Lead-authored-by: tsy <tangsiyang2001@foxmail.com> Co-authored-by: Antoine Pitrou <antoine@python.org> Signed-off-by: Antoine Pitrou <antoine@python.org>
- Loading branch information