Skip to content
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

Wrong order when restoring dumps (>= 10 Chunks) #237

Open
gugacavalieri opened this issue Nov 9, 2022 · 1 comment · May be fixed by #239
Open

Wrong order when restoring dumps (>= 10 Chunks) #237

gugacavalieri opened this issue Nov 9, 2022 · 1 comment · May be fixed by #239

Comments

@gugacavalieri
Copy link

gugacavalieri commented Nov 9, 2022

There is a problem when restoring dumps that have more than 10 chunks. This happens because of the way Replibyte is generating the chunk names.

So here it's what happening when we have over 10 chunks:

Output chunks order when ordering by key:
1.dump
10.dump
11.dump
2.dump
3.dump 
...

So 10.dump and 11.dump gets restored before 2.dump and 3.dump because Replibyte it's not adding a trailing zero. For example: 02.dump < 10.dump but 10.dump < 2.dump.

This is preventing dumps from being restored.

I can provide a fix. Was thinking that something like that would solve the issue (Formatting the file name with always two digits) for S3 and local_disk:

let dump_file_path = format!("{}/{:02}.dump", dump_dir_path, file_part);
@evoxmusic
Copy link
Contributor

Thanks for reporting this issue. I know why it happened and I can provide a fix (or.you can if you want)

@gugacavalieri gugacavalieri linked a pull request Nov 20, 2022 that will close this issue
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 a pull request may close this issue.

2 participants