forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
97862: backupccl: checkpoint restore progress with a span frontier r=adityamaru,rhu713 a=msbutler Previously, after a node restart or pause event, a resumed restore would have to redo a significant amount of work due to our naive progress checkpointing procedure described in cockroachdb#87843. This patch upgrades our checkpointing procedure to use a span frontier, significantly reducing wasted work. Here's the basic idea: 1. Create a span frontier behind a lock on the coordinator. 2. When the coordinator receives a progress update about a span that was ingested, forward that span's time stamp in the frontier to the hardcoded `completedSpanTime`. 3. The frontier is periodically persisted to the job record every 15 seconds or after 5% progress. Note, only the first N spans are persisted, to bound the amount of data written to the jobs table. The bound is set by the new restore.frontier_checkpoint_max_bytes private setting. 4. If the job is resumed after some progress was persisted, the generative split and scatter processor will skip the completed spans in the persisted frontier. Note that if a part of requiredSpan was complete, only the subset that is incomplete will get processed into a restoreSpanEntry. As part of this work, many of the function signatures in the restore codebase were refactored to prevent a large number input parameters. Further, much of the restore checkpointing code was moved to the seperate restore_progress.go file. Fixes cockroachdb#87843 Release note: None Co-authored-by: Michael Butler <[email protected]>
- Loading branch information
Showing
14 changed files
with
1,058 additions
and
338 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.