-
Notifications
You must be signed in to change notification settings - Fork 726
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
*: use a separate runner for updating subtree #8158
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8158 +/- ##
==========================================
+ Coverage 77.34% 77.38% +0.03%
==========================================
Files 471 471
Lines 61398 61407 +9
==========================================
+ Hits 47489 47520 +31
+ Misses 10350 10325 -25
- Partials 3559 3562 +3
Flags with carried forward coverage won't be shown. Click here to find out more. |
prometheus.MustRegister(RunnerPendingTasks) | ||
prometheus.MustRegister(RunnerFailedTasks) | ||
prometheus.MustRegister(RunnerTaskExecutionDuration) | ||
prometheus.MustRegister(RunnerSucceededTasks) |
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.
Should we also add metrics to tell the task number of different priorities?
server/cluster/cluster.go
Outdated
@@ -1121,7 +1122,7 @@ func (c *RaftCluster) processRegionHeartbeat(ctx *core.MetaProcessContext, regio | |||
tracer.OnCollectRegionStatsFinished() | |||
if c.storage != nil { | |||
if saveKV { | |||
ctx.TaskRunner.RunTask( | |||
ctx.StatisticsRunner.RunTask( |
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.
SaveRegionToKV
is put into the statistics runner, the runner name might be strange. But I cannot come up with a better name.
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.
How about just calling it MiscRunner
?
Signed-off-by: Ryan Leung <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>
if c.persistConfig.GetScheduleConfig().EnableHeartbeatConcurrentRunner { | ||
taskRunner = c.heartbeatRunnner | ||
taskRunner = c.heartbeatRunner |
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.
need to add in here?
statisticsRunner = c.statisticsRunner
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.
nice catch
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.
rest lgtm
Signed-off-by: Ryan Leung <[email protected]>
pkg/core/context.go
Outdated
TaskRunner ratelimit.Runner | ||
StatisticsRunner ratelimit.Runner | ||
LogRunner ratelimit.Runner |
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.
Could you please help add some comments here to explain the different responsibilities of these runners?
pkg/ratelimit/runner.go
Outdated
f func(context.Context) | ||
name string | ||
retained bool |
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.
This naming is vague without looking at the actual logic, maybe a line of comment would be helpful.
server/cluster/cluster.go
Outdated
@@ -1121,7 +1122,7 @@ func (c *RaftCluster) processRegionHeartbeat(ctx *core.MetaProcessContext, regio | |||
tracer.OnCollectRegionStatsFinished() | |||
if c.storage != nil { | |||
if saveKV { | |||
ctx.TaskRunner.RunTask( | |||
ctx.StatisticsRunner.RunTask( |
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.
How about just calling it MiscRunner
?
Signed-off-by: Ryan Leung <[email protected]>
/merge |
@rleungx: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests You only need to trigger
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
This pull request has been accepted and is ready to merge. Commit hash: eae4f6a
|
What problem does this PR solve?
Issue Number: Ref #7897
What is changed and how does it work?
Check List
Tests
Release note