Repository navigation
Add a fan-out primitive to the S3 executors (GH-1332) #1367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
4f90bd4
Add a fan-out primitive to the S3 executors (GH-1332)
laughingman7743 6590afd
Share the scope, waiter, and error-code helpers of the fan-out (GH-1332)
laughingman7743 5ff74f6
Count failures that the executor reports in a map (GH-1332)
laughingman7743 58ef05d
Correct the asyncio docs on how the fan-outs run (GH-1332)
laughingman7743 81a0c9c
Record executor failures when their futures settle (GH-1332)
laughingman7743 e0f0bfa
Close the remaining gaps in failure recording of a map (GH-1332)
laughingman7743 13860df
Wait for one future that ends a map (GH-1332)
laughingman7743 6b8f5f1
Resume the end of a map's wait after an interrupt in its signal (GH-1…
laughingman7743 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Self-review round 2: claims, compatibility, operations (Claude Code)
Base 2a60ecc, head 5ff74f6 → 58ef05d (repairs to docs and a docstring).
Claims checked against the code and tests:
S3MapResult.failure"first counted failure in completion order": true for failures of calls; the executor's own failures are recorded when the waiting thread sees them (added to the body).test_map_failure_stops_batchholds the waiter until the freed thread has taken the next call; the gate mutant fails it.asyncio.run()shutdown waits for the running calls":test_map_async_at_loop_shutdown. The limit for a loop closed without cancelling is documented inmap_async's docstring.docs/filesystem.md, failed or interrupted reads "raised once they have ended", andrm/clear_multipart_uploadsinterrupts:test_failed_read_waits_for_running_readsandtest_interrupted_operation_cancels_queued_requests(real SIGINT; it fails on master with both requests sent).docs/aio.md, cancellation waits for "the range reads of a file": corrected. It holds foropen_async()files only. AnAioS3Fileread runs inasyncio.to_thread, whose cancellation does not wait for the thread.docs/aio.mdcomparison table: corrected. The bulk delete no longer usesasyncio.gather, and since Share one request pool per filesystem among its files and operations (GH-1332) #1359 the sync filesystem runs its parallel requests in its request pool, not per-call thread pools.AioS3FileSystemdocstring, "run parallel requests withasyncio.gather": corrected to per-object calls such as_mv()copies.Existing callers:
S3File(executor=...)with a customS3Executorkeeps working:mapuses onlysubmit()throughsubmit_to()(test_map_executor_without_limit).S3Executor.map,map_async,waiter, andS3MapResult; nothing is removed.submit_to()now cancels a cancelled caller's submission. Its callers (write sessions, the map, the asyncio copy) only gain the earlier release of queued arguments (S8).AWS operator:
unstoppable_retries()(B4)._delete_batchstill invalidates the cache in itsfinally.Evidence: the local filesystem suite only, on a WSL2 host with real S3. CI and the full
just test pyathena/sqla/sqla-asyncruns are pending before Ready.