-
Notifications
You must be signed in to change notification settings - Fork 85
Conversation
Hi @tirsen, thanks for the contribution! However, we're more interested in including S3 support through the |
It's not trivial. Afaict there is no I could implement a |
Dumpling already does some level of "buffering" itself for example here but the buffer size is hard coded to be 1mb which is not necessarily optimal for S3. It needs to be configurable. It would be better to implement buffering at the |
Actually vfs isn't a good choice for this use case anyway, it buffers the entire content of a file in memory and sends all of it on close: https://github.com/C2FO/vfs/blob/master/backend/s3/file.go#L203 Or does dumpling split up tables into many smaller files? How large does individual files become if we dump say a 300gb large database? |
Yes you could implement a
Yes!
If you supply But if none of the argument is provided then yes Dumpling will happily create a 300 GB file. |
@kennytm Here is the Writer implementation on top of Uploader: pingcap/br#524 |
Ok I think this is good to go now |
Nice job! We will take a look soon. |
Ok I think all comments resolved now. PHAL |
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.
Can we add a configuration region
to set region for s3 configurations? When I'm testing upload to S3, setting AWS_REGION
doesn't work. If config.BackendOptions.S3.Region
is set it will work correctly.
Rest LGTM, @kennytm PTAL
@lichunzhu using the URL |
Yes it works. So we just ask users to set |
Co-authored-by: kennytm <[email protected]>
CLI flags are now exposed so you can also set the region that way. Is |
This env var should be used by default, but unfortunately we have overridden the config making the env var useless. I think we should fix this later on BR. |
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.
rest LGTM, thanks 😄
Co-authored-by: kennytm <[email protected]>
* Write directly to S3 * Use aws CLI from docker instead * Re-implement on top of github.com/pingcap/br/pkg/storage * Bump br dependency * Move initialization of ExternalStorage to adjustConfig * Use failpoint * No need to munge the path * Remove unused Co-authored-by: kennytm <[email protected]> * Storage flags * Remove TODO Co-authored-by: kennytm <[email protected]> Co-authored-by: Chunzhu Li <[email protected]> Co-authored-by: kennytm <[email protected]>
* Write directly to S3 * Use aws CLI from docker instead * Re-implement on top of github.com/pingcap/br/pkg/storage * Bump br dependency * Move initialization of ExternalStorage to adjustConfig * Use failpoint * No need to munge the path * Remove unused Co-authored-by: kennytm <[email protected]> * Storage flags * Remove TODO Co-authored-by: kennytm <[email protected]> Co-authored-by: Chunzhu Li <[email protected]> Co-authored-by: kennytm <[email protected]>
* Write directly to S3 * Use aws CLI from docker instead * Re-implement on top of github.com/pingcap/br/pkg/storage * Bump br dependency * Move initialization of ExternalStorage to adjustConfig * Use failpoint * No need to munge the path * Remove unused Co-authored-by: kennytm <[email protected]> * Storage flags * Remove TODO Co-authored-by: kennytm <[email protected]> Co-authored-by: Chunzhu Li <[email protected]> Co-authored-by: kennytm <[email protected]>
* Write directly to S3 * Use aws CLI from docker instead * Re-implement on top of github.com/pingcap/br/pkg/storage * Bump br dependency * Move initialization of ExternalStorage to adjustConfig * Use failpoint * No need to munge the path * Remove unused Co-authored-by: kennytm <[email protected]> * Storage flags * Remove TODO Co-authored-by: kennytm <[email protected]> Co-authored-by: Chunzhu Li <[email protected]> Co-authored-by: kennytm <[email protected]>
* Write directly to S3 * Use aws CLI from docker instead * Re-implement on top of github.com/pingcap/br/pkg/storage * Bump br dependency * Move initialization of ExternalStorage to adjustConfig * Use failpoint * No need to munge the path * Remove unused Co-authored-by: kennytm <[email protected]> * Storage flags * Remove TODO Co-authored-by: kennytm <[email protected]> Co-authored-by: Chunzhu Li <[email protected]> Co-authored-by: kennytm <[email protected]>
What problem does this PR solve?
#8 Support S3
What is changed and how it works?
Switch to using VFS which supports local files, S3 and GCS. For now this only supports S3 but it should be easy to add support to e.g. GCS.
You simply prefix the output directory with "s3://bucket" e.g.:
For now all config is passed in using the standard AWS environment variables.
Check List
Tests
Will test by running dumpling against our staging databases.
Side effects
Related changes
Release note