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

executor: support save partition stats in concurrency #38239

Merged
merged 15 commits into from Oct 25, 2022

Conversation

Yisaer
Copy link
Contributor

@Yisaer Yisaer commented Sep 29, 2022

Signed-off-by: yisaer disxiaofei@163.com

What problem does this PR solve?

Issue Number: ref #35142

Problem Summary:

save partition stats in single thread is time-consuming.

What is changed and how it works?

Support saving stats in concurrency with the session hold by the domain.

Check List

Tests

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

https://pingcap.feishu.cn/docx/QfDid1XOuoQYLUxDFrycvUpFnqb

Release note

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

None

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Sep 29, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • Reminiscent
  • xuyifangreeneyes

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.

@ti-chi-bot ti-chi-bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none needs-cherry-pick-release-5.3 Type: Need cherry pick to release-5.3 needs-cherry-pick-release-5.4 Type: Need cherry pick to release-5.4 needs-cherry-pick-release-6.1 needs-cherry-pick-6.3 size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Sep 29, 2022
@Yisaer Yisaer removed needs-cherry-pick-release-5.3 Type: Need cherry pick to release-5.3 needs-cherry-pick-release-5.4 Type: Need cherry pick to release-5.4 needs-cherry-pick-release-6.1 needs-cherry-pick-6.3 labels Sep 29, 2022
Signed-off-by: yisaer <disxiaofei@163.com>

add time log

Signed-off-by: yisaer <disxiaofei@163.com>

fix ctx

Signed-off-by: yisaer <disxiaofei@163.com>

fix ctx

Signed-off-by: yisaer <disxiaofei@163.com>

fix ctx

Signed-off-by: yisaer <disxiaofei@163.com>

fix ctx

Signed-off-by: yisaer <disxiaofei@163.com>

fix ctx

Signed-off-by: yisaer <disxiaofei@163.com>

fix ctx

Signed-off-by: yisaer <disxiaofei@163.com>

fix ctx

Signed-off-by: yisaer <disxiaofei@163.com>

add log

Signed-off-by: yisaer <disxiaofei@163.com>

fix

Signed-off-by: yisaer <disxiaofei@163.com>

fix

Signed-off-by: yisaer <disxiaofei@163.com>

fix

Signed-off-by: yisaer <disxiaofei@163.com>

fix

Signed-off-by: yisaer <disxiaofei@163.com>
@Yisaer Yisaer force-pushed the analyze_concurrency_save_2 branch 2 times, most recently from adfab8f to e304632 Compare September 29, 2022 07:01
@ti-chi-bot ti-chi-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 1, 2022
@ti-chi-bot ti-chi-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 24, 2022
Signed-off-by: yisaer <disxiaofei@163.com>
@Yisaer Yisaer removed needs-cherry-pick-release-5.3 Type: Need cherry pick to release-5.3 needs-cherry-pick-release-5.4 Type: Need cherry pick to release-5.4 labels Oct 24, 2022
@Yisaer
Copy link
Contributor Author

Yisaer commented Oct 24, 2022

/run-build

Signed-off-by: yisaer <disxiaofei@163.com>
domain/domain.go Outdated Show resolved Hide resolved
Copy link
Contributor

@xuyifangreeneyes xuyifangreeneyes left a comment

Choose a reason for hiding this comment

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

rest LGTM

Signed-off-by: yisaer <disxiaofei@163.com>
Signed-off-by: yisaer <disxiaofei@163.com>
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Oct 25, 2022
@Yisaer Yisaer requested a review from qw4990 October 25, 2022 04:02
EnforceMPP bool `toml:"enforce-mpp" json:"enforce-mpp"`
StatsLoadConcurrency uint `toml:"stats-load-concurrency" json:"stats-load-concurrency"`
StatsLoadQueueSize uint `toml:"stats-load-queue-size" json:"stats-load-queue-size"`
AnalyzePartitionConcurrencyQuota uint `toml:"analyze-partition-concurrency-quota" json:"analyze-partition-concurrency-quota"`
Copy link
Contributor

Choose a reason for hiding this comment

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

How about using an SQL variable instead of a config item?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We use config is due to AnalyzePartitionConcurrencyQuota is used to pre-create the session pool in domain when tidb-server started.

@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Oct 25, 2022
@Reminiscent
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 4ff0abb

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Oct 25, 2022
@ti-chi-bot
Copy link
Member

@Yisaer: Your PR was out of date, I have automatically updated it for you.

At the same time I will also trigger all tests for you:

/run-all-tests

If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

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 ti-community-infra/tichi repository.

@Yisaer
Copy link
Contributor Author

Yisaer commented Oct 25, 2022

/run-unit-test

@ti-chi-bot ti-chi-bot merged commit 70f3348 into pingcap:master Oct 25, 2022
@Yisaer Yisaer deleted the analyze_concurrency_save_2 branch October 25, 2022 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants