Skip to content

Use CRT response file for downloadFile in S3 TransferManager - #7230

Open
alextwoods wants to merge 1 commit into
masterfrom
alexwoo/s3-crt-tm-download-to-file
Open

Use CRT response file for downloadFile in S3 TransferManager#7230
alextwoods wants to merge 1 commit into
masterfrom
alexwoo/s3-crt-tm-download-to-file

Conversation

@alextwoods

@alextwoods alextwoods commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Use CRT response file for downloadFile in S3 TransferManager

Motivation and Context

We previously only added direct-download-to-file support from CRT to the low level S3 CRT client in #6289. This PR, extends that support to the S3 TransferManager now that pause/resume is natively supported by CRT (see: awslabs/aws-crt-java#1008).

Modifications

  • Add CrtFileDownload — a FileDownload implementation that pauses/resumes downloads where CRT writes the response body directly to a file (bypassing AsyncResponseTransformer)
  • Add S3MetaRequestPauseObservable.pauseAsync() — an async pause API that waits for CRT to quiesce before returning the resume token
  • Extend CrtS3TransferManager with doDownloadFile and doResumeDownloadFile that use CRT's direct-to-file path with pause/resume support
  • Add TransferProgressUpdater.crtProgressListener() and wrapCrtResponseFileTransformer() to track progress when the SDK never sees the response body bytes
  • Extend ResumableRequestConverter with toCrtDownloadFileRequest to build ranged-GET resume requests from CRT resume tokens
  • Throw SdkClientException on InterruptedException during pause (consistent with SDK convention) instead of silently swallowing

Testing

New and existing unit and integration tests + manual testing.

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have read the CONTRIBUTING document
  • Local run of mvn install succeeds
  • My code follows the code style of this project
  • My change requires a change to the Javadoc documentation
  • I have updated the Javadoc documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed
  • I have added a changelog entry. Adding a new entry must be accomplished by running the scripts/new-change script and following the instructions. Commit the new file created by the script in .changes/next-release with your changes.

License

  • I confirm that this pull request can be released under the Apache 2 license

@alextwoods
alextwoods requested a review from a team as a code owner August 5, 2026 17:54
@alextwoods
alextwoods force-pushed the alexwoo/s3-crt-tm-download-to-file branch from ae4b81b to e336659 Compare August 12, 2026 15:47
@alextwoods
alextwoods force-pushed the alexwoo/s3-crt-tm-download-to-file branch from e336659 to 3b10f11 Compare August 12, 2026 21:41
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.

1 participant