-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[DO NOT MERGE] Use aws file transfer manager in place of s3blobstore.actor.cpp. #12075
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
Draft
saintstack
wants to merge
1
commit into
apple:main
Choose a base branch
from
saintstack:file_transfer
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
Unfinished! Fit the file transfer in behind the s3client.actor.cpp currently used by bulkload. If WITH_AWS_BACKUP is set, we build s3 and transfer libs (and dependencies -- lots!). * fdbclient/S3Client.actor.cpp Go via the new S3TransferManagerWrapper.actor.h 'bridge' to use aws transfer manager but for delete, given transfer manager has no delete, use the aws s3client directly. * fdbclient/S3TransferManagerWrapper.actor.cpp Bridge between s3client and aws file transfer. Enqueues transfers and then runs monitors via the file transfer handle to figure when done. Monitors are run in a little thread pool. Needs startup/shutdown for thread pool. * fdbclient/include/fdbclient/S3TransferManagerWrapper.actor.h Add uploadFileWithTransferManager(std::string localFile, std::string bucketName, std::string objectKey); Add downloadFileWithTransferManager(std::string bucketName,
Result of foundationdb-pr-clang-arm on Linux CentOS 7
|
Result of foundationdb-pr-macos-m1 on macOS Ventura 13.x
|
Result of foundationdb-pr-clang-ide on Linux CentOS 7
|
Result of foundationdb-pr-cluster-tests on Linux CentOS 7
|
Result of foundationdb-pr on Linux CentOS 7
|
Result of foundationdb-pr-clang on Linux CentOS 7
|
Result of foundationdb-pr-macos on macOS Ventura 13.x
|
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.
Draft. Illustration of how we might move to use aws file transfer manager api.
But after this exploration, I don't think we should go this route.
Here are "Advantages" of aws file transfer manager api https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/transfer-manager.html
It would be sweet if s3 interface could be a lib maintained by others and the 'new' aws s3client is purportedly faster but otherwise, we already have most of the above in our current implementation (or there are features we don't really want -- concurrent transfers, directory transfers). We have (configurable) multipart sizing and retrying w/ backoffs, checksum verification, etc. And there are downsides in that the file transfer calls are blocking. Under the hood, they are run in worker threads. To make them sit behind actor api requires gymnastics -- monitoring the returned file transfer handles in a little thread pool (lots of new code). The file transfer bandwidth throttling can't be meshed w/ the native fdb throttling -- not easily at least.
I looked at using the aws s3client behind s3blobstore too but again the calls are blocking so to fit flow, we'd need async'ing bridging code. Here is a little table that a 'friend' of mine made for me:
Here are some notes on this (unfinished) PR:
Fit the aws file transfer api in behind the s3client.actor.cpp currently used by bulkload/bulkdump.
If WITH_AWS_BACKUP is set, we build s3 and transfer libs (and dependencies -- lots!).
fdbclient/S3Client.actor.cpp
Go via the new S3TransferManagerWrapper.actor.h 'bridge' to use aws transfer manager. The transfer manager doesn't do delete so for these, use the aws s3client directly.
fdbclient/S3TransferManagerWrapper.actor.cpp
Bridge between s3client and aws file transfer. Enqueues transfers and then runs monitors via the file transfer handle to figure when done. Monitors are run in a little thread pool. Needs startup/shutdown for thread pool.
fdbclient/include/fdbclient/S3TransferManagerWrapper.actor.h
Add uploadFileWithTransferManager(std::string localFile, std::string bucketName, std::string objectKey); Add downloadFileWithTransferManager(std::string bucketName,