Skip to content
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

Merged
merged 12 commits into from
Jan 4, 2024

Conversation

CabinfeverB
Copy link
Contributor

@CabinfeverB CabinfeverB commented Dec 6, 2023

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)
    image

  • No need to test

    • I checked and no code files have been changed.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

Signed-off-by: Cabinfever_B <cabinfeveroier@gmail.com>
Signed-off-by: Cabinfever_B <cabinfeveroier@gmail.com>
Copy link

ti-chi-bot bot commented Dec 6, 2023

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-linked-issue do-not-merge/needs-tests-checked release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 6, 2023
Copy link

tiprow bot commented Dec 6, 2023

Hi @CabinfeverB. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

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.

@CabinfeverB
Copy link
Contributor Author

/ok-to-test

@ti-chi-bot ti-chi-bot bot added the ok-to-test Indicates a PR is ready to be tested. label Dec 6, 2023
@CabinfeverB
Copy link
Contributor Author

/retest-required

@CabinfeverB CabinfeverB changed the title go mod: upgrade client-go to support get region from pd follower vars: add tidb_enable_pd_follower_handle to support get region from pd follower Dec 7, 2023
Signed-off-by: Cabinfever_B <cabinfeveroier@gmail.com>
Signed-off-by: Cabinfever_B <cabinfeveroier@gmail.com>
Signed-off-by: Cabinfever_B <cabinfeveroier@gmail.com>
@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 25, 2023
@CabinfeverB CabinfeverB changed the title vars: add tidb_enable_pd_follower_handle to support get region from pd follower vars: add tidb_enable_pd_follower_handle_region_api to support get region from pd follower Dec 25, 2023
@CabinfeverB
Copy link
Contributor Author

/ok-to-test

@CabinfeverB
Copy link
Contributor Author

/test build

Copy link

tiprow bot commented Dec 25, 2023

@CabinfeverB: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test tiprow_fast_test

Use /test all to run all jobs.

In response to this:

/test build

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.

@CabinfeverB
Copy link
Contributor Author

/retest-required

Copy link

codecov bot commented Dec 25, 2023

Codecov Report

Merging #49231 (65d2b14) into master (6f32664) will increase coverage by 10.0645%.
Report is 4 commits behind head on master.
The diff coverage is 90.0000%.

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     
Flag Coverage Δ
integration 48.8642% <85.7142%> (?)
unit 79.2930% <90.0000%> (+7.4109%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 73.6130% <ø> (+17.3001%) ⬆️
parser ∅ <ø> (∅)
br 71.8804% <ø> (+20.4214%) ⬆️

Signed-off-by: Cabinfever_B <cabinfeveroier@gmail.com>
@CabinfeverB CabinfeverB marked this pull request as ready for review December 25, 2023 08:57
@ti-chi-bot ti-chi-bot bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 25, 2023
Signed-off-by: Cabinfever_B <cabinfeveroier@gmail.com>

rename

Signed-off-by: Cabinfever_B <cabinfeveroier@gmail.com>
@CabinfeverB
Copy link
Contributor Author

/test tiprow_fast_test

Copy link

ti-chi-bot bot commented Dec 27, 2023

@CabinfeverB: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test build
  • /test check-dev
  • /test check-dev2
  • /test mysql-test
  • /test pull-integration-ddl-test
  • /test pull-lightning-integration-test
  • /test pull-mysql-client-test
  • /test unit-test

The following commands are available to trigger optional jobs:

  • /test canary-notify-when-compatibility-sections-changed
  • /test pingcap/tidb/canary_ghpr_unit_test
  • /test pull-br-integration-test
  • /test pull-common-test
  • /test pull-e2e-test
  • /test pull-integration-common-test
  • /test pull-integration-copr-test
  • /test pull-integration-jdbc-test
  • /test pull-integration-mysql-test
  • /test pull-integration-nodejs-test
  • /test pull-sqllogic-test
  • /test pull-tiflash-test

Use /test all to run the following jobs that were automatically triggered:

  • pingcap/tidb/ghpr_build
  • pingcap/tidb/ghpr_check
  • pingcap/tidb/ghpr_check2
  • pingcap/tidb/ghpr_mysql_test
  • pingcap/tidb/ghpr_unit_test
  • pingcap/tidb/pull_integration_ddl_test
  • pingcap/tidb/pull_mysql_client_test

In response to this:

/test tiprow_fast_test

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>
@CabinfeverB
Copy link
Contributor Author

/retest-required

@CabinfeverB CabinfeverB mentioned this pull request Dec 28, 2023
3 tasks
Signed-off-by: Cabinfever_B <cabinfeveroier@gmail.com>
@CabinfeverB
Copy link
Contributor Author

/retest-required

@easonn7
Copy link

easonn7 commented Jan 2, 2024

/approve

@@ -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"
Copy link
Member

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>
@CabinfeverB CabinfeverB changed the title vars: add pd_enable_follower_region_api to support get region from pd follower vars: add pd_enable_follower_handle_region to support get region from pd follower Jan 2, 2024
@@ -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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be EnableFollowerHandleRegion?

Copy link
Contributor Author

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.

Copy link
Member

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.

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jan 2, 2024
@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jan 2, 2024
Copy link

ti-chi-bot bot commented Jan 2, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-01-02 08:22:21.037367694 +0000 UTC m=+2158832.074594621: ☑️ agreed by rleungx.
  • 2024-01-02 08:50:57.207359333 +0000 UTC m=+2160548.244586258: ☑️ agreed by nolouch.

Copy link

ti-chi-bot bot commented Jan 4, 2024

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added the approved label Jan 4, 2024
Signed-off-by: Cabinfever_B <cabinfeveroier@gmail.com>
@CabinfeverB
Copy link
Contributor Author

/test pull-mysql-client-test

Copy link

tiprow bot commented Jan 4, 2024

@CabinfeverB: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test tiprow_fast_test

Use /test all to run all jobs.

In response to this:

/test pull-mysql-client-test

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.

@CabinfeverB
Copy link
Contributor Author

/test check-dev2

Copy link

tiprow bot commented Jan 4, 2024

@CabinfeverB: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test tiprow_fast_test

Use /test all to run all jobs.

In response to this:

/test check-dev2

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.

@ti-chi-bot ti-chi-bot bot merged commit e8861cf into pingcap:master Jan 4, 2024
22 checks passed
AilinKid pushed a commit to AilinKid/tidb that referenced this pull request Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm ok-to-test Indicates a PR is ready to be tested. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow PD follower handle region API
5 participants