Skip to content

Move pagination into asyncio.to_thread#238

Merged
mephenor merged 2 commits into
mainfrom
fix/list_multipart_upload_issues
Jul 7, 2026
Merged

Move pagination into asyncio.to_thread#238
mephenor merged 2 commits into
mainfrom
fix/list_multipart_upload_issues

Conversation

@mephenor

@mephenor mephenor commented Jul 3, 2026

Copy link
Copy Markdown
Member

Currently the pagination and related IO accidentally happen synchronously on the main thread.
This PR moves the corresponding callsites completely into asyncio.to_thread which should correctly dispatch them on separate threads.

As a performance optimization, _list_multipart_uploads_for_object now uses a Prefix=object_id filter. This works for the current setup, but will break if we ever change any functionality that creates an object to use anything else than Key=object_id.

@mephenor
mephenor requested a review from TheByronHimes July 3, 2026 12:13

@TheByronHimes TheByronHimes left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but I think a template update is required now

@mephenor
mephenor merged commit b789bc9 into main Jul 7, 2026
8 checks passed
@mephenor
mephenor deleted the fix/list_multipart_upload_issues branch July 7, 2026 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants