-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
store/tikv: Remove gcTaskWorker #11033
store/tikv: Remove gcTaskWorker #11033
Conversation
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
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.
Fantastic!
Codecov Report
@@ Coverage Diff @@
## master #11033 +/- ##
================================================
+ Coverage 81.0036% 81.2155% +0.2118%
================================================
Files 419 419
Lines 89375 90117 +742
================================================
+ Hits 72397 73189 +792
+ Misses 11736 11656 -80
- Partials 5242 5272 +30 |
/run-all-tests |
/run-unit-test |
Wait a minute. The metrics is not correct.
The metrics is correct, but since |
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.
Please add some unit tests.
…ed to log Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
@jackysp This is already tested by |
I found the coverage is a bit decreasing. |
@jackysp I think that's caused by removal of code which is previously covered. PTAL again. |
@disksing PTAL again. There's some more changes to let |
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. When would we support useDistributedGC only so we can remove the related code?
startKey, rangeEndKey := r.StartKey, r.EndKey | ||
completedRegions := 0 | ||
var stat RangeTaskStat |
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 do not think to define a variable without init it is a good idea, is it a good habit in golang?
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.
It's field will be initialized as 0 by default here.
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.
Totally good habit in Go.
/run-all-tests |
/run-all-tests |
Signed-off-by: MyonKeminta MyonKeminta@users.noreply.github.com
What problem does this PR solve?
The
RangeTaskRunner
is implemented just like howgcTaskWorker
did, to suit for all tasks that need to do operations to regions in a range. Now let's removegcTaskWorker
and replace it withRangeTaskRunner
.What is changed and how it works?
This PR removed
gcTaskWorker
and usesRangeTaskRunner
instead.Check List
Tests