Cheksum comparison#3885
Conversation
056d2bd to
10b6287
Compare
|
Done |
3755bf4 to
0efd86e
Compare
bc165a5 to
a172c63
Compare
|
This jenkins build is expected to trigger DTests and SCT. Let's check if we are asserting the backup progress. |
Michal-Leszczynski
left a comment
There was a problem hiding this comment.
Nice work!
In the past there was an idea of making it possible to delete files in batches (I don't think that it is currently supported in our rclone fork). This seems like a simple change on rclone side that would allow us to save maaaany API calls (both in backup purger, and now in backup deduplication).
@karol-kokoszka maybe we should include it in the scope of this effort (perhaps in a separate series of rclone/SM PRs)?
a172c63 to
e0ace3a
Compare
0b64056 to
1ba788a
Compare
|
@Michal-Leszczynski please re-review. |
Michal-Leszczynski
left a comment
There was a problem hiding this comment.
This PR adds the deduplication stage, but it does not change the rclone options of the upload stage - it still has checksum. Is this expected?
In theory it shouldn't be a big deal, but we could disable the checksum comparison in rclone, so that when we checked that the crc32 doesn't match, we don't compare the hashes for nothing.
63b23de to
cdcf63b
Compare
operations/cat on RClone server can be executed against /backup/meta prefix and files with .crc32 suffix
d702da2 to
0dd57ff
Compare
|
Some sample logs (after changing from DEBUG to INFO) Overall, it will be logged on debug level as there may be plenty of these entries during the backup. |
Michal-Leszczynski
left a comment
There was a problem hiding this comment.
Actually, there is a small important thing missing.
AFAIU, the d.Progress.files is initialized only during the INDEX stage. This means that pausing and resuming backup during DEDUPLICATION stage would result in d.Progress.files being empty and the whole process falling to pieces.
This is the reason why some stages allow reindexing on resume:
// Skip completed stages
if run.PrevID != uuid.Nil {
// Allow reindexing if previous state is manifest creation or upload
if stage == StageIndex && (prevStage == StageManifest || prevStage == StageUpload) { //nolint: revive
// continue
} else if prevStage.Index() > stage.Index() {
return nil
}
}DEDUPLICATE should be one of those stages as well.
What's funny is that it looks like checking for reindexing is bugged (by me), as the moved SCHEMA stage should also be reindexed on resume (as it is before UPLOAD, which supposedly requires reindexation - although I think that it only impacts progress recording/display there).
|
Perhaps it would be good to have a test which checks backup pause/resume during each stage. |
Nice catch ! |
c788d9f to
bbbffe6
Compare
c620b15 to
3a84aae
Compare
|
@Michal-Leszczynski please re-review |
|
@karol-kokoszka kudos for adding dedicated deduplication test. I re-review the changes and left some small comments. |
3a84aae to
3252fee
Compare
3252fee to
f73e136
Compare
Fixes #3827
This PR adds explicit stage to the backup process - deduplication.
It follows https://docs.google.com/document/d/1EtGlF6UGNy34D_7QsnCheaukp3UwVObZU56PBdd0CQ8/edit#heading=h.jl2qbpcarwp9
It is done to mitigate the problem with current deduplication/checksum comparison which causes SM to create a checksum of every SSTable file and to compare it with the checksum from remote.
This PR changes restore of versioned snapshot as well to corrupt CRC32 files.
Please make sure that: