-
Notifications
You must be signed in to change notification settings - Fork 725
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
resource control: fix unsafe usage of timer.Reset (#8877) #8901
resource control: fix unsafe usage of timer.Reset (#8877) #8901
Conversation
close tikv#8876 Signed-off-by: ti-chi-bot <[email protected]>
Signed-off-by: lhy1024 <[email protected]>
maybe we need to pick all relative code about timer.reset to 7.1? |
Signed-off-by: lhy1024 <[email protected]>
close tikv#6719 Signed-off-by: lhy1024 <[email protected]> Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com> Signed-off-by: lhy1024 <[email protected]>
Signed-off-by: lhy1024 <[email protected]>
4b36b40
to
120fe68
Compare
select { | ||
case <-ctx.Done(): | ||
log.Info("stop synchronizing with leader due to context canceled") | ||
return | ||
case <-time.After(retryInterval): | ||
case <-timer.C: | ||
timer.Stop() |
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.
If returned the timer won't be stopped.
Signed-off-by: lhy1024 <[email protected]>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bufferflies, rleungx The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
This is an automated cherry-pick of #8877
What problem does this PR solve?
Issue Number: Close #8876
What is changed and how does it work?
Check List
Tests
Release note