-
Notifications
You must be signed in to change notification settings - Fork 5.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
vars: add pd_enable_follower_handle_region
to support get region from pd follower
#49231
vars: add pd_enable_follower_handle_region
to support get region from pd follower
#49231
Conversation
Signed-off-by: Cabinfever_B <cabinfeveroier@gmail.com>
Signed-off-by: Cabinfever_B <cabinfeveroier@gmail.com>
Skipping CI for Draft Pull Request. |
Hi @CabinfeverB. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with I understand the commands that are listed here. 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 kubernetes/test-infra repository. |
/ok-to-test |
/retest-required |
tidb_enable_pd_follower_handle
to support get region from pd follower
Signed-off-by: Cabinfever_B <cabinfeveroier@gmail.com>
tidb_enable_pd_follower_handle
to support get region from pd followertidb_enable_pd_follower_handle_region_api
to support get region from pd follower
/ok-to-test |
/test build |
@CabinfeverB: The specified target(s) for
Use In response to this:
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 kubernetes/test-infra repository. |
/retest-required |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #49231 +/- ##
=================================================
+ Coverage 71.8820% 81.9466% +10.0645%
=================================================
Files 1439 2442 +1003
Lines 346160 673187 +327027
=================================================
+ Hits 248827 551654 +302827
- Misses 77058 100848 +23790
- Partials 20275 20685 +410
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Signed-off-by: Cabinfever_B <cabinfeveroier@gmail.com>
/test tiprow_fast_test |
@CabinfeverB: The specified target(s) for
The following commands are available to trigger optional jobs:
Use
In response to this:
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 kubernetes/test-infra repository. |
Signed-off-by: Cabinfever_B <cabinfeveroier@gmail.com>
/retest-required |
/retest-required |
/approve |
pkg/sessionctx/variable/tidb_vars.go
Outdated
@@ -722,6 +722,9 @@ const ( | |||
// TiDBEnableTSOFollowerProxy indicates whether to enable the TSO Follower Proxy feature of PD client. | |||
TiDBEnableTSOFollowerProxy = "tidb_enable_tso_follower_proxy" | |||
|
|||
// PDEnableFollowerRegionAPI indicates whether to enable the PD Follower handle region API. | |||
PDEnableFollowerRegionAPI = "pd_enable_follower_region_api" |
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 pd_enable_follower_handle_region
Signed-off-by: Cabinfever_B <cabinfeveroier@gmail.com>
pd_enable_follower_region_api
to support get region from pd followerpd_enable_follower_handle_region
to support get region from pd follower
@@ -69,6 +69,15 @@ func (do *Domain) setPDClientDynamicOption(name, sVal string) { | |||
break | |||
} | |||
variable.EnableTSOFollowerProxy.Store(val) | |||
case variable.PDEnableFollowerHandleRegion: | |||
val := variable.TiDBOptOn(sVal) | |||
// Note: EnableFollowerHandle is only used for region API now. |
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 be EnableFollowerHandleRegion?
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.
As we discussed in pr, the variable names of pd client will not change for now. At present, we only need to define the names directly exposed to users in TiDB.
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.
Got it, I remember that.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: easonn7, nolouch, rleungx, tangenta The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: Cabinfever_B <cabinfeveroier@gmail.com>
/test pull-mysql-client-test |
@CabinfeverB: The specified target(s) for
Use In response to this:
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 kubernetes/test-infra repository. |
/test check-dev2 |
@CabinfeverB: The specified target(s) for
Use In response to this:
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 kubernetes/test-infra repository. |
…rom pd follower (pingcap#49231) close pingcap#49747
What problem does this PR solve?
Issue Number: close #49747
Problem Summary:
What changed and how does it work?
Check List
Tests
Unit test
Integration test
Manual test (add detailed scripts or steps below)
No need to test
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.