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

backupccl: update progress more frequently #89971

Merged
merged 1 commit into from
Nov 10, 2022

Conversation

stevendanna
Copy link
Collaborator

@stevendanna stevendanna commented Oct 14, 2022

A code comment in the ChunkProgressLogger implementation says:

To avoid hammering the system.jobs table, when a response comes
back, we issue a progress update only if a) it's been a duration of
progressTimeThreshold since the last update, or b) the difference between the
last logged fractionCompleted and the current fractionCompleted is more than
progressFractionThreshold.

But as implemented, it would only update the progress if both of those conditions were true. For very large or very slow backups, this meant that progress updates could be very far about, which is a bit disconcerting.

Here, I've changed the condition to match the comment, so now, if progress has been made, we should see an update every 15 seconds.

Epic: None
Release note (bug fix): Fix bug that could result in infrequent progress updates for very large backup or restore jobs.

A code comment in the ChunkProgressLogger implementation says:

> To avoid hammering the system.jobs table, when a response comes
> back, we issue a progress update only if a) it's been a duration of
> progressTimeThreshold since the last update, or b) the difference between the
> last logged fractionCompleted and the current fractionCompleted is more than
> progressFractionThreshold.

But as implemented, it would only update the progress if both of those
conditions were true. For very large or very slow backups, this meant
that progress updates could be _very_ far about, which is a bit
disconcerting.

Here, I've changed the condition to match the comment, so now, if
progress has been made, we should see an update every 15 seconds.

Release note (bug fix): Fix bug that could result in infrequent
progress updates for very large backup or restore jobs.
@stevendanna stevendanna requested a review from a team as a code owner October 14, 2022 12:50
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@stevendanna stevendanna requested a review from dt October 18, 2022 10:09
@stevendanna
Copy link
Collaborator Author

bors r=adityamaru

@craig
Copy link
Contributor

craig bot commented Nov 10, 2022

Build succeeded:

@craig craig bot merged commit 0a065fa into cockroachdb:master Nov 10, 2022
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 this pull request may close these issues.

3 participants