Skip to content

server:add querystats sync to follower pd #4922

Open
qidi1 wants to merge 3 commits into
tikv:masterfrom
qidi1:sync
Open

server:add querystats sync to follower pd #4922
qidi1 wants to merge 3 commits into
tikv:masterfrom
qidi1:sync

Conversation

@qidi1

@qidi1 qidi1 commented May 11, 2022

Copy link
Copy Markdown
Contributor

Signed-off-by: qidi1 1083369179@qq.com

What problem does this PR solve?

In PD now, QueryStat data is not synchronized and we can't get QueryStat data in non-leader nodes

Issue Number: #pingcap/tidb-dashboard/issues/1209

What is changed and how does it work?

add querystats sync to fllower pd 

Check List

Tests

  • Manual test (add detailed scripts or steps below)

Code changes

  • Has persistent data change

Side effects

  • Possible performance regression

Related changes

Release note

None

Manual test

We ran a small cluster locally. On the cluster, test data was generated using the tiup bench tool. The results are shown in the figure below.
image
image

@ti-chi-bot

Copy link
Copy Markdown
Member

[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.

Details

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

@ti-chi-bot ti-chi-bot added do-not-merge/needs-linked-issue release-note Denotes a PR that will be considered when it comes time to generate release notes. labels May 11, 2022
@ti-chi-bot ti-chi-bot requested review from Yisaer and rleungx May 11, 2022 06:25
@ti-chi-bot ti-chi-bot added release-note-none Denotes a PR that doesn't merit a release note. and removed release-note Denotes a PR that will be considered when it comes time to generate release notes. labels May 11, 2022
@rleungx rleungx changed the title server:add querystats sync to fllower pd server:add querystats sync to follower pd May 12, 2022
regionLeaders := resp.GetRegionLeaders()
hasStats := len(stats) == len(regions)
hasBuckets := len(buckets) == len(regions)
hasQueryStats := len(queryStats) == len(regions)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can it merge to hasStats?

RegionStats: stats,
RegionLeaders: leaders,
Buckets: buckets,
QueryStats: queryStats,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can queryStats be merge into ReginStats?

@ti-chi-bot

Copy link
Copy Markdown
Member

[FORMAT CHECKER NOTIFICATION]

Notice: To remove the do-not-merge/needs-linked-issue label, please provide the linked issue number on one line in the PR body, for example: Issue Number: close #123 or Issue Number: ref #456, multiple issues should use full syntax for each issue and be separated by a comma, like: Issue Number: close #123, ref #456.

📖 For more info, you can check the "Linking issues" section in the CONTRIBUTING.md.

@ti-chi-bot ti-chi-bot Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 18, 2023
@ti-chi-bot

ti-chi-bot Bot commented May 18, 2023

Copy link
Copy Markdown
Contributor

PR needs rebase.

Details

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.

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

Labels

do-not-merge/needs-linked-issue needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. release-note-none Denotes a PR that doesn't merit a release note.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants