Skip to content

Move the S3FileSystem multipart copy onto the multipart write session #1229

Closed

Description

@laughingman7743

Sub-issue of #1211, which records the design decisions. Depends on the session added for S3File.

Use case

S3FileSystem._copy_object_with_multipart_upload tracks its creation and part copies itself, with _finish_multipart_upload and _abort_multipart_upload, and submits every part copy at once to its executor.

Proposed change

Move the synchronous multipart copy onto _S3WriteSession:

  • Part copies are admitted against max_workers instead of all being queued at once.
  • The prepared parameters of plan_multipart_copy() keep reaching the requests unfiltered, so that botocore still rejects an unknown parameter.
  • Annotations stay outside the session and use the version and ETag of the completion.
  • _finish_multipart_upload and _abort_multipart_upload are removed if nothing else uses them.

Behavior changes are listed in the PR for the 4.2.0 release notes.

Validation plan (if implementing)

  • The existing multipart copy tests, including interrupts during creation and abort failures.
  • The filesystem integration tests against the CI bucket.

Activity

  1. laughingman7743 commented on Oct 17, 2026

    @laughingman7743
    MemberAuthor

    From #1254 (#1240): S3FileSystem._finish_multipart_upload(..., abort=True) has no caller (_copy_object_with_multipart_upload passes abort=False and runs its own cleanup), and after #1254 no test exercises that branch. When this issue removes the method, nothing else needs it; until then the abort parameter and its branch are untested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions