-
Notifications
You must be signed in to change notification settings - Fork 11.8k
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
[ISSUE #8970] Remove redundant heartbeats #8971
[ISSUE #8970] Remove redundant heartbeats #8971
Conversation
…o weihubeats/develop
…o weihubeats/develop
…o weihubeats/develop
…o weihubeats/develop
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #8971 +/- ##
=============================================
- Coverage 47.73% 47.60% -0.13%
+ Complexity 11774 11752 -22
=============================================
Files 1304 1304
Lines 91118 91199 +81
Branches 11692 11716 +24
=============================================
- Hits 43495 43418 -77
- Misses 42264 42400 +136
- Partials 5359 5381 +22 ☔ View full report in Codecov by Sentry. |
LGTM |
it is used to make sure any proxy can receive heartbeat request before receive send or pull request when some proxy services share LB |
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 look the previous comment
Can you give me an example? |
you can see how GO_AWAY works in remoting protocol to make proxy shutdown gracefully when client receive GO_AWAY from proxy, client will reconnect proxy and send heartbeat first. |
We can track connections to the broker where the initial connection triggers client-initiated heartbeats, while reconnections due to go away will have their heartbeats triggered by the onChannelActive even |
@qianye1001 How does this sit with you |
Sorry, I didn't realize it would affect the lossless release code |
Heartbeats are sent to the broker during client start, rebalancing, scheduled tasks, and Channel creation. A locking is used to prevent duplicate heartbeat transmissions. This is a reasonable solution. Add more complex logic to ensure no additional heartbeats are sent would lead to difficulties in understanding and increased maintenance costs. if only need prevent warning log, it is more recommended to ignore locking failure or check lock stats before send Heartbeat when Channel creation. |
I have added a strictLockMode parameter to the sendHeartbeatToBroker method to control whether to log lock acquisition failures. When strictLockMode is true, the system will log lock acquisition failures; when false, these failures will be silently ignored. |
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
1 similar comment
@lizhimins Can you help me review this merge request |
#8970