Skip to content

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

@gugacavalieri

Description

@gugacavalieri

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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions