-
Notifications
You must be signed in to change notification settings - Fork 1
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
stopper: Add method for task-tracking #4
Conversation
This change corrects a context-break, where callbacks executed by the key scheduler were executed using a context from the scheduler's workgroup. In cases where the lease loop recycles and the target database is executing slowly, the old queries were not guaranteed to have been canceled when the next iteration of the loop starts. This commit depends on cockroachdb/field-eng-powertools#4
This change adds a Call() method to stopper.Context. This allows the stopper to track tasks that were not started using the Go() method. Additionally, a Len() method is added to return the number of tasks being tracked within a stopper hierarchy.
0bbf638
to
b99e99b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @BramGruneir and @MattWhelan)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @MattWhelan)
This change corrects a context-break, where callbacks executed by the key scheduler were executed using a context from the scheduler's workgroup. In cases where the lease loop recycles and the target database is executing slowly, the old queries were not guaranteed to have been canceled when the next iteration of the loop starts. This commit depends on cockroachdb/field-eng-powertools#4
This change corrects a context-break, where callbacks executed by the key scheduler were executed using a context from the scheduler's workgroup. In cases where the lease loop recycles and the target database is executing slowly, the old queries were not guaranteed to have been canceled when the next iteration of the loop starts. Replicator will now exit if a stuck task is detected by the lease loop since there is no other way to guarantee that the task would not continue at some arbitrary point in the future. This commit depends on cockroachdb/field-eng-powertools#4
This change corrects a context-break, where callbacks executed by the key scheduler were executed using a context from the scheduler's workgroup. In cases where the lease loop recycles and the target database is executing slowly, the old queries were not guaranteed to have been canceled when the next iteration of the loop starts. Replicator will now exit if a stuck task is detected by the lease loop since there is no other way to guarantee that the task would not continue at some arbitrary point in the future. This commit depends on cockroachdb/field-eng-powertools#4
This change corrects a context-break, where callbacks executed by the key scheduler were executed using a context from the scheduler's workgroup. In cases where the lease loop recycles and the target database is executing slowly, the old queries were not guaranteed to have been canceled when the next iteration of the loop starts. Replicator will now exit if a stuck task is detected by the lease loop since there is no other way to guarantee that the task would not continue at some arbitrary point in the future. This commit depends on cockroachdb/field-eng-powertools#4 (cherry picked from commit 644ad7c)
This change corrects a context-break, where callbacks executed by the key scheduler were executed using a context from the scheduler's workgroup. In cases where the lease loop recycles and the target database is executing slowly, the old queries were not guaranteed to have been canceled when the next iteration of the loop starts. Replicator will now exit if a stuck task is detected by the lease loop since there is no other way to guarantee that the task would not continue at some arbitrary point in the future. This commit depends on cockroachdb/field-eng-powertools#4 (cherry picked from commit 644ad7c)
This change adds a Call() method to stopper.Context. This allows the stopper to track tasks that were not started using the Go() method.
Additionally, a Len() method is added to return the number of tasks being tracked within a stopper hierarchy.
This change is