Fix concurrent S3 credential refresh and preloaded split stalls - #32
Draft
winningsix wants to merge 2 commits into
Draft
Fix concurrent S3 credential refresh and preloaded split stalls#32winningsix wants to merge 2 commits into
winningsix wants to merge 2 commits into
Conversation
Avoid binding scan drivers to an arbitrary in-flight preload. Wake all current split waiters after each preload completion so accumulated ready work cannot be stranded by a lost edge notification.
Wrap the default AWS credential chain in an eager synchronized cache. Concurrent S3 signers share one refresh and continue to rotate credentials five minutes before expiration.
Selective Build Plan
Selective build plan |
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.
Summary
binding a driver to the queue-front preload
be stranded by a lost edge notification
concurrent S3 request signing shares one refresh while preserving normal
credential rotation
Why
Two independent stalls appeared in cold S3 scans:
refreshes and produced an approximately 10-second tail.
remained blocked in
kWaitForSplit. A preload completion only woke onewaiter; notifications that arrived before waiters registered left ready
splits queued with no later wakeup.
The second issue was reproduced with 495 splits per executor: before the fix,
only 357 splits were consumed before a 20-second query timeout. With wake-all,
the same cold query completed consistently.
Validation
velox_exec_infra_test --gtest_filter=TaskTest.preloadedSplitsAreConsumedInReadyOrdervelox_s3file_test --gtest_filter=S3UtilTest.synchronizedCachingCredentialsProviderThe S3 request-layer A/B used identical scan scheduling:
S3CrtClient, 8 MiB: 6.559–7.175 secondsS3Client, 8 MiB: timeout at 20 secondsRisk
task's scan-driver count and is required to preserve level-triggered
readiness.
five minutes before expiration. The underlying provider still owns
credential discovery and rotation.