-
Notifications
You must be signed in to change notification settings - Fork 728
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
client/tso: improve the switching of TSO stream #8123
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. |
// Only the Global TSO needs to watch the updateTSOConnectionCtxsCh to sense the | ||
// change of the cluster when TSO Follower Proxy is enabled. | ||
// TODO: support TSO Follower Proxy for the Local TSO. | ||
if dc == globalDCLocation { |
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 remove this check?
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.
Previously, this goroutine is only used to check the connection updating when the TSO Follower Proxy is enabled for the global DC location. This PR makes it a permanent daemon to update the connection regularly.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8123 +/- ##
=======================================
Coverage 77.37% 77.38%
=======================================
Files 471 471
Lines 61252 61257 +5
=======================================
+ Hits 47393 47401 +8
+ Misses 10297 10291 -6
- Partials 3562 3565 +3
Flags with carried forward coverage won't be shown. Click here to find out more. |
4553b7f
to
d64c3f6
Compare
@@ -178,6 +178,14 @@ func (c *tsoClient) getTSORequest(ctx context.Context, dcLocation string) *tsoRe | |||
return req | |||
} | |||
|
|||
func (c *tsoClient) getTSODispatcher(dcLocation string) (*tsoDispatcher, 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.
does this function need to be put in tso_dispatcher.go
?
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.
Here is the explain: #8121 (comment)
Signed-off-by: JmPotato <ghzpotato@gmail.com>
Signed-off-by: JmPotato <ghzpotato@gmail.com>
Signed-off-by: JmPotato <ghzpotato@gmail.com>
Signed-off-by: JmPotato <ghzpotato@gmail.com>
Signed-off-by: JmPotato <ghzpotato@gmail.com>
Signed-off-by: JmPotato <ghzpotato@gmail.com>
Signed-off-by: JmPotato <ghzpotato@gmail.com>
6a680c6
to
435b7f8
Compare
/merge |
@HuSharp: 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: 435b7f8
|
close tikv#7997, ref tikv#8047 Previously, without enabling the TSO Follower Proxy, we only passively update its stream when a TSO request fails. This means that we cannot automatically and gradually complete the TSO stream update after a service switch. This PR strengthens this logic, which can improve the success rate of TSO requests during service switching. Signed-off-by: JmPotato <ghzpotato@gmail.com>
What problem does this PR solve?
Issue Number: close #7997, ref #8047.
What is changed and how does it work?
Check List
Tests
Release note