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

pd_client: support dynamically modifying min-resolved-ts report interval and reduce retry times (#15837) #16065

Open
wants to merge 1 commit into
base: release-7.1
Choose a base branch
from

Conversation

ti-chi-bot
Copy link
Member

This is an automated cherry-pick of #15837

What is changed and how it works?

Issue Number: ref #15184

What's Changed:

- The min-resolved-ts will report periodically, no need to do retires
- support dynamic change `min-resolved-ts` report interval
mysql> show config where Name='raftstore.pd-report-min-resolved-ts-interval';
+------+-----------------+----------------------------------------------+-------+
| Type | Instance        | Name                                         | Value |
+------+-----------------+----------------------------------------------+-------+
| tikv | 127.0.0.1:20160 | raftstore.pd-report-min-resolved-ts-interval | 1s    |
+------+-----------------+----------------------------------------------+-------+
1 row in set (0.01 sec)

mysql> set config tikv `raftstore.pd-report-min-resolved-ts-interval`='10s';
Query OK, 0 rows affected (0.13 sec)

mysql> show config where Name='raftstore.pd-report-min-resolved-ts-interval';
+------+-----------------+----------------------------------------------+-------+
| Type | Instance        | Name                                         | Value |
+------+-----------------+----------------------------------------------+-------+
| tikv | 127.0.0.1:20160 | raftstore.pd-report-min-resolved-ts-interval | 10s   |
+------+-----------------+----------------------------------------------+-------+
1 row in set (0.02 sec)

and then report interval can be changed

[2023/11/21 17:24:05.151 +08:00] [INFO] [client.rs:1074] ["report min resolved ts"] [min_resolved_ts=445791244670992385] [store_id=1] [thread_id=0x5]
[2023/11/21 17:24:06.152 +08:00] [INFO] [client.rs:1074] ["report min resolved ts"] [min_resolved_ts=445791244670992385] [store_id=1] [thread_id=0x5]
[2023/11/21 17:24:07.153 +08:00] [INFO] [client.rs:1074] ["report min resolved ts"] [min_resolved_ts=445791244670992385] [store_id=1] [thread_id=0x5]
[2023/11/21 17:24:08.155 +08:00] [INFO] [client.rs:1074] ["report min resolved ts"] [min_resolved_ts=445791244670992385] [store_id=1] [thread_id=0x5]
[2023/11/21 17:24:09.135 +08:00] [INFO] [config.rs:1270] ["raftstore config changed"] [change="{\"pd_report_min_resolved_ts_interval\": 10000ms}"] [thread_id=0x5]
[2023/11/21 17:24:09.155 +08:00] [INFO] [client.rs:1074] ["report min resolved ts"] [min_resolved_ts=445791244670992385] [store_id=1] [thread_id=0x5]
[2023/11/21 17:24:19.157 +08:00] [INFO] [client.rs:1074] ["report min resolved ts"] [min_resolved_ts=445791244670992385] [store_id=1] [thread_id=0x5]
[2023/11/21 17:24:29.158 +08:00] [INFO] [client.rs:1074] ["report min resolved ts"] [min_resolved_ts=445791249913872385] [store_id=1] [thread_id=0x5]
[2023/11/21 17:24:39.159 +08:00] [INFO] [client.rs:1074] ["report min resolved ts"] [min_resolved_ts=445791249913872385] [store_id=1] [thread_id=0x5]
[2023/11/21 17:24:49.160 +08:00] [INFO] [client.rs:1074] ["report min resolved ts"] [min_resolved_ts=445791255156752386] [store_id=1] [thread_id=0x5]

Check List

Tests

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

Release note

- pd_client: reduce min-resolved-ts retry time
- support dynamic change `min-resolved-ts` report interval

ref tikv#15184

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
Copy link
Contributor

ti-chi-bot bot commented Nov 24, 2023

[REVIEW NOTIFICATION]

This pull request has not been approved.

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@wuhuizuo
Copy link
Contributor

/merge

// just for ping the bot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants