refactor(io): hand out S3 delegates by shared_ptr and build them off the lock - #898
Open
plusplusjiajia wants to merge 1 commit into
Open
refactor(io): hand out S3 delegates by shared_ptr and build them off the lock#898plusplusjiajia wants to merge 1 commit into
plusplusjiajia wants to merge 1 commit into
Conversation
plusplusjiajia
force-pushed
the
refactor-s3-delegate-lifetime
branch
from
August 24, 2026 08:52
27bac8f to
8f33e30
Compare
plusplusjiajia
force-pushed
the
refactor-s3-delegate-lifetime
branch
from
August 24, 2026 10:40
8f33e30 to
ea3d7cd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ArrowS3FileIO's per-credential delegates were raw references into an unsynchronized vector:
SetStorageCredentialsrebuilt it while a concurrent operation could still hold one, and building an S3 client — which can reach the network for bucket-region discovery — happened with no locking at all.This gives ArrowS3FileIO the treatment #889 gave ResolvingFileIO: delegates held and handed out by
shared_ptr, state under ashared_mutex, delegate construction moved off the lock, andDeleteFilesmatching every location against one snapshot so a batch sees a single delegate generation.SupportsStorageCredentials::credentials()returns by value, since a reference can dangle once a concurrent install replaces the vector.