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

variable: fix setting tidb_enable_tso_follower_proxy with TSO service #51216

Merged
merged 1 commit into from
Feb 21, 2024

Conversation

JmPotato
Copy link
Member

@JmPotato JmPotato commented Feb 21, 2024

What problem does this PR solve?

Issue Number: close #51194.

Problem Summary:

Fix the problem that setting tidb_enable_tso_follower_proxy with TSO service will cause stuck.

What changed and how does it work?

Return the error after setting tidb_enable_tso_follower_proxy.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)

With TSO service:

mysql> select @@tidb_enable_tso_follower_proxy;
+----------------------------------+
| @@tidb_enable_tso_follower_proxy |
+----------------------------------+
|                                0 |
+----------------------------------+
1 row in set (0.00 sec)

mysql> set global tidb_enable_tso_follower_proxy = 1;
ERROR 1105 (HY000): [pd] tso follower proxy is only supported in PD service mode
mysql> select @@tidb_enable_tso_follower_proxy;
+----------------------------------+
| @@tidb_enable_tso_follower_proxy |
+----------------------------------+
|                                0 |
+----------------------------------+
1 row in set (0.00 sec)

mysql> set global tidb_enable_tso_follower_proxy = 0;
ERROR 1105 (HY000): [pd] tso follower proxy is only supported in PD service mode
mysql> select @@tidb_enable_tso_follower_proxy;
+----------------------------------+
| @@tidb_enable_tso_follower_proxy |
+----------------------------------+
|                                0 |
+----------------------------------+
1 row in set (0.00 sec)

mysql> set global tidb_tso_client_batch_max_wait_time = 1;
Query OK, 0 rows affected (0.01 sec)

mysql> select @@tidb_tso_client_batch_max_wait_time;
+---------------------------------------+
| @@tidb_tso_client_batch_max_wait_time |
+---------------------------------------+
| 1                                     |
+---------------------------------------+
1 row in set (0.00 sec)

mysql> set global tidb_tso_client_batch_max_wait_time = 0;
Query OK, 0 rows affected (0.02 sec)

mysql> select @@tidb_tso_client_batch_max_wait_time;
+---------------------------------------+
| @@tidb_tso_client_batch_max_wait_time |
+---------------------------------------+
| 0                                     |
+---------------------------------------+
1 row in set (0.00 sec)

With PD:

mysql> select @@tidb_enable_tso_follower_proxy;
+----------------------------------+
| @@tidb_enable_tso_follower_proxy |
+----------------------------------+
|                                0 |
+----------------------------------+
1 row in set (0.00 sec)

mysql> set global tidb_enable_tso_follower_proxy = 1;
Query OK, 0 rows affected (0.02 sec)

mysql> select @@tidb_enable_tso_follower_proxy;
+----------------------------------+
| @@tidb_enable_tso_follower_proxy |
+----------------------------------+
|                                1 |
+----------------------------------+
1 row in set (0.00 sec)

mysql> set global tidb_enable_tso_follower_proxy = 0;
Query OK, 0 rows affected (0.02 sec)

mysql> select @@tidb_enable_tso_follower_proxy;
+----------------------------------+
| @@tidb_enable_tso_follower_proxy |
+----------------------------------+
|                                0 |
+----------------------------------+
1 row in set (0.00 sec)

mysql> set global tidb_tso_client_batch_max_wait_time = 1;
Query OK, 0 rows affected (0.01 sec)

mysql> select @@tidb_tso_client_batch_max_wait_time;
+---------------------------------------+
| @@tidb_tso_client_batch_max_wait_time |
+---------------------------------------+
| 1                                     |
+---------------------------------------+
1 row in set (0.00 sec)

mysql> set global tidb_tso_client_batch_max_wait_time = 0;
Query OK, 0 rows affected (0.02 sec)

mysql> select @@tidb_tso_client_batch_max_wait_time;
+---------------------------------------+
| @@tidb_tso_client_batch_max_wait_time |
+---------------------------------------+
| 0                                     |
+---------------------------------------+
1 row in set (0.00 sec)

Release note

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

Fix the problem that setting `tidb_enable_tso_follower_proxy` with TSO service will cause stuck.

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Feb 21, 2024
@JmPotato
Copy link
Member Author

/cc @easonn7 @zimulala @hawkingrei

Copy link

ti-chi-bot bot commented Feb 21, 2024

@JmPotato: GitHub didn't allow me to request PR reviews from the following users: easonn7.

Note that only pingcap members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/cc @easonn7 @zimulala @hawkingrei

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.

@JmPotato
Copy link
Member Author

/cc @yudongusa

Copy link

ti-chi-bot bot commented Feb 21, 2024

@JmPotato: GitHub didn't allow me to request PR reviews from the following users: yudongusa.

Note that only pingcap members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/cc @yudongusa

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 added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Feb 21, 2024
Signed-off-by: JmPotato <ghzpotato@gmail.com>
@JmPotato JmPotato force-pushed the fix_tso_follower_proxy_switch branch from d1065df to 54bf878 Compare February 21, 2024 06:04
@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Feb 21, 2024
@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Feb 21, 2024
Copy link

codecov bot commented Feb 21, 2024

Codecov Report

Merging #51216 (54bf878) into master (11f716e) will decrease coverage by 15.8310%.
Report is 7 commits behind head on master.
The diff coverage is 55.5555%.

Additional details and impacted files
@@                Coverage Diff                @@
##             master     #51216         +/-   ##
=================================================
- Coverage   70.5914%   54.7604%   -15.8310%     
=================================================
  Files          1467       1576        +109     
  Lines        434904     604290     +169386     
=================================================
+ Hits         307005     330912      +23907     
- Misses       108638     250342     +141704     
- Partials      19261      23036       +3775     
Flag Coverage Δ
integration 36.8776% <55.5555%> (?)
unit 70.3888% <55.5555%> (+0.0016%) ⬆️

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

Components Coverage Δ
dumpling 53.9957% <ø> (ø)
parser ∅ <ø> (∅)
br 51.5082% <ø> (+5.6426%) ⬆️

@JmPotato
Copy link
Member Author

/retest

@easonn7
Copy link

easonn7 commented Feb 21, 2024

/approve

Copy link

ti-chi-bot bot commented Feb 21, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: easonn7, hawkingrei, zimulala

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 approved lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Feb 21, 2024
Copy link

ti-chi-bot bot commented Feb 21, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-02-21 06:06:39.188482598 +0000 UTC m=+423687.936105709: ☑️ agreed by hawkingrei.
  • 2024-02-21 07:05:44.907421605 +0000 UTC m=+427233.655044712: ☑️ agreed by zimulala.

@JmPotato
Copy link
Member Author

/test mysql-test

Copy link

tiprow bot commented Feb 21, 2024

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

  • /test tidb_parser_test
  • /test tiprow_fast_test

Use /test all to run all jobs.

In response to this:

/test mysql-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.

@JmPotato
Copy link
Member Author

/test check_dev

Copy link

ti-chi-bot bot commented Feb 21, 2024

@JmPotato: 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 check_dev

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.

Copy link

tiprow bot commented Feb 21, 2024

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

  • /test tidb_parser_test
  • /test tiprow_fast_test

Use /test all to run all jobs.

In response to this:

/test check_dev

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.

@JmPotato
Copy link
Member Author

/test check-dev

Copy link

tiprow bot commented Feb 21, 2024

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

  • /test tidb_parser_test
  • /test tiprow_fast_test

Use /test all to run all jobs.

In response to this:

/test check-dev

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 aa4f4da into pingcap:master Feb 21, 2024
23 checks passed
@JmPotato JmPotato deleted the fix_tso_follower_proxy_switch branch February 21, 2024 13:56
@lhy1024
Copy link

lhy1024 commented May 27, 2024

Does it need to be picked to release-7.5?

@JmPotato
Copy link
Member Author

Does it need to be picked to release-7.5?

No, PD supports the microservice mode starting from v8.0.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

(pd-microservices) after enable pd microservice, "set global tidb_enable_tso_follower_proxy = 1" will be stuck
5 participants