-
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
*: optimize heartbeat process with concurrent runner - part 1 #8053
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. |
0b177f8
to
1247655
Compare
f4380e2
to
8961f5b
Compare
e670b0b
to
a75ae5f
Compare
Signed-off-by: nolouch <nolouch@gmail.com>
a75ae5f
to
39dfc43
Compare
f6c36d3
to
39dfc43
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #8053 +/- ##
========================================
Coverage 77.36% 77.36%
========================================
Files 468 469 +1
Lines 60943 61092 +149
========================================
+ Hits 47146 47262 +116
- Misses 10252 10278 +26
- Partials 3545 3552 +7
Flags with carried forward coverage won't be shown. Click here to find out more. |
Signed-off-by: nolouch <nolouch@gmail.com>
debug, info := d, i | ||
if taskRunner != nil { | ||
debug = func(msg string, fields ...zap.Field) { | ||
taskRunner.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.
Is the error needed?
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 will add metrics about this error in next PR.
@@ -81,6 +91,9 @@ func NewCluster(parentCtx context.Context, persistConfig *config.PersistConfig, | |||
storage: storage, | |||
clusterID: clusterID, | |||
checkMembershipCh: checkMembershipCh, | |||
|
|||
taskRunner: ratelimit.NewConcurrentRunner(hbConcurrentRunner, time.Minute), |
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.
Will it cause the memory to increase a lot if there are many hb requests?
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 depends on the number of waiting queue closures (tasks). we suppose each costs 128 bytes, 1M is about 128MB. but it's released very quickly I think.
/merge |
@nolouch: 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: 85e6950
|
What problem does this PR solve?
Issue Number: Ref #7897
Part of #8052
What is changed and how does it work?
Check List
Tests
Release note