-
Notifications
You must be signed in to change notification settings - Fork 128
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
Add Buffer Size Parameter to dump create #234
base: main
Are you sure you want to change the base?
Add Buffer Size Parameter to dump create #234
Conversation
Thank you for the contribution. I'm going to take a look this weekend |
replibyte/src/tasks/full_dump.rs
Outdated
} | ||
|
||
impl<'a, S> FullDumpTask<'a, S> | ||
where | ||
S: Source, | ||
{ | ||
pub fn new(source: S, datastore: Box<dyn Datastore>, options: SourceOptions<'a>) -> Self { | ||
pub fn new(source: S, datastore: Box<dyn Datastore>, options: SourceOptions<'a>, arg_buffer_size: usize) -> Self { |
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.
My 2 comments:
- Include
arg_buffer_size
intooptions
and removearg_buffer_size
parameter - rename
options.arg_buffer_size
into something more explicit likedump_chunk_size
or anything else
Good idea! I will do some work on the fixes. |
@evoxmusic, added Also have to play a little bit with the test methods 😃 |
@gugacavalieri can you check tests errors? |
Thanks for adding this, can you also update the README with an example of how to use this? |
Changelog
buffer_size
when dumping the database100
(This was the previous value)Motivation
I was running into the same issue when dumping tables bigger than 100MB (#208). The order of the Statements were wrong and I was not able to restore the dumps. I still don't know 100% what is cause the issue but it's probably related when the compressed chunks are being read from the datastore and are being restored in the wrong order.
So, this PR aims to make the arguments more flexible and serve as a workaround for the issue above.
PS. I am still learning Rust, so please let me know if this is a good way to move parameters around 😄