-
Notifications
You must be signed in to change notification settings - Fork 719
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
schedule: fix panic caused by removing tombstone #2015
Conversation
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Codecov Report
@@ Coverage Diff @@
## master #2015 +/- ##
=========================================
- Coverage 77.52% 77.4% -0.12%
=========================================
Files 180 180
Lines 18108 18109 +1
=========================================
- Hits 14038 14018 -20
- Misses 3013 3025 +12
- Partials 1057 1066 +9
Continue to review full report at Codecov.
|
@@ -899,5 +899,6 @@ func (oc *OperatorController) GetLeaderScheduleStrategy() core.ScheduleStrategy | |||
func (oc *OperatorController) RemoveStoreLimit(storeID uint64) { | |||
oc.Lock() | |||
defer oc.Unlock() | |||
oc.cluster.AttachAvailableFunc(storeID, nil) |
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.
why is nil
rather than func(){ return false }
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.
I just reset to the original value when the store limit does not exist.
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.
LGTM.
/merge |
/run-all-tests |
@rleungx merge failed. |
/merge |
Your auto merge job has been accepted, waiting for 2014 |
/run-all-tests |
cherry pick to release-3.0 failed |
cherry pick to release-3.1 failed |
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
What problem does this PR solve?
Fixes #1979.
What is changed and how it works?
This PR fixes the panic problem by resetting the attached function when removing the store limit.
Check List
Tests
Related changes