backup: normalize fast restore fractionCompleted across phases#169779
Draft
msbutler wants to merge 2 commits intocockroachdb:masterfrom
Draft
backup: normalize fast restore fractionCompleted across phases#169779msbutler wants to merge 2 commits intocockroachdb:masterfrom
msbutler wants to merge 2 commits intocockroachdb:masterfrom
Conversation
Add a `targetFraction` parameter to `NewChunkProgressLogger`, `NewChunkProgressLoggerForJob`, and `DeprecatedNewChunkProgressLoggerForJob`. Previously, progress was always interpolated from `startFraction` to 1.0. The new parameter allows callers to specify a different upper bound, which is needed for multi-phase jobs where each phase occupies a portion of the overall progress range. All existing callers pass 1.0 to preserve current behavior. We modify the deprecated API rather than migrating restore off it because the deprecated chunk progress logger is currently coupled to checkpoint frontier persistence via `updateJobCallback`. Migrating to the new API would also require migrating frontier persistence to the job frontier API -- work for another day. Epic: none Release note: None Co-Authored-By: roachdev-claude <[email protected]>
Previously, ExperimentalCopy (fast restore) reported fractionCompleted from 0 to 1.0 during the link phase, then reset to 0 and went back to 1.0 during the download phase, causing a visible regression in the UI. Normalize progress so the link phase occupies the first 5% (0.0-0.05) and the download phase occupies the remaining 95% (0.05-1.0), ensuring fractionCompleted increases monotonically across both phases. Epic: none Release note: None Co-Authored-By: roachdev-claude <[email protected]>
Contributor
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
Member
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
backup: normalize fast restore fractionCompleted across phases
Previously, ExperimentalCopy (fast restore) reported fractionCompleted
from 0 to 1.0 during the link phase, then reset to 0 and went back to
1.0 during the download phase, causing a visible regression in the UI.
Normalize progress so the link phase occupies the first 5% (0.0-0.05)
and the download phase occupies the remaining 95% (0.05-1.0), ensuring
fractionCompleted increases monotonically across both phases.
Epic: none
Release note: None
Co-Authored-By: roachdev-claude [email protected]
jobs: add targetFraction parameter to ChunkProgressLogger
Add a
targetFractionparameter toNewChunkProgressLogger,NewChunkProgressLoggerForJob, andDeprecatedNewChunkProgressLoggerForJob.Previously, progress was always interpolated from
startFractionto 1.0.The new parameter allows callers to specify a different upper bound,
which is needed for multi-phase jobs where each phase occupies a
portion of the overall progress range.
All existing callers pass 1.0 to preserve current behavior.
We modify the deprecated API rather than migrating restore off it because
the deprecated chunk progress logger is currently coupled to checkpoint
frontier persistence via
updateJobCallback. Migrating to the new APIwould also require migrating frontier persistence to the job frontier
API -- work for another day.
Epic: none
Release note: None
Co-Authored-By: roachdev-claude [email protected]