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

ttl: limit total count of running tasks across the cluster #41586

Merged
merged 2 commits into from
Feb 28, 2023

Conversation

YangKeao
Copy link
Member

What problem does this PR solve?

Issue Number: close #41585

Problem Summary:

What is changed and how it works?

A new system varaible tidb_ttl_running_task is introduced to limit the concurrency of TTL tasks. The default value of it is 0, which means 3 times the count of TiKV. If it's set to -1, it means no limitation.

Check List

Tests

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

Release note

A new variable `tidb_ttl_running_task` is added to limit the concurrency of TTL tasks across the cluster.

@YangKeao YangKeao requested a review from a team as a code owner February 20, 2023 07:14
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Feb 20, 2023

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • bb7133
  • lcwangchao

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 release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 20, 2023
@YangKeao YangKeao force-pushed the setup-ttl-global-limit branch 4 times, most recently from 3bf8791 to 2ee23bb Compare February 20, 2023 08:14
@YangKeao YangKeao requested a review from lcwangchao February 20, 2023 08:45
@YangKeao YangKeao changed the title ttl: limit total count of running tasks ttl: limit total count of running tasks across the cluster Feb 20, 2023
@YangKeao
Copy link
Member Author

/retest

sessionctx/variable/sysvar.go Outdated Show resolved Hide resolved
sessionctx/variable/tidb_vars.go Outdated Show resolved Hide resolved
ttl/ttlworker/task_manager.go Show resolved Hide resolved
ttl/ttlworker/task_manager.go Show resolved Hide resolved
@YangKeao YangKeao force-pushed the setup-ttl-global-limit branch from 2ee23bb to dda8c98 Compare February 22, 2023 09:18
@ti-chi-bot
Copy link
Member

@YangKeao: PR needs rebase.

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 added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 22, 2023
@YangKeao YangKeao force-pushed the setup-ttl-global-limit branch from dda8c98 to 4cdae62 Compare February 22, 2023 09:53
@ti-chi-bot ti-chi-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 22, 2023
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Feb 22, 2023
@YangKeao
Copy link
Member Author

/retest

@YangKeao YangKeao force-pushed the setup-ttl-global-limit branch from 4cdae62 to 3e2aa6a Compare February 24, 2023 07:43
Copy link
Member

@bb7133 bb7133 left a comment

Choose a reason for hiding this comment

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

LGTM

@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 Feb 28, 2023
@bb7133
Copy link
Member

bb7133 commented Feb 28, 2023

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: 3e2aa6a

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Feb 28, 2023
@ti-chi-bot ti-chi-bot removed the status/can-merge Indicates a PR has been approved by a committer. label Feb 28, 2023
@bb7133
Copy link
Member

bb7133 commented Feb 28, 2023

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: 2451274

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Feb 28, 2023
@YangKeao
Copy link
Member Author

/retest

2 similar comments
@YangKeao
Copy link
Member Author

/retest

@lcwangchao
Copy link
Collaborator

/retest

@lcwangchao
Copy link
Collaborator

/rebuild

@ti-chi-bot ti-chi-bot merged commit 469ec9d into pingcap:master Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 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.

the concurrency of running TTL tasks should be limited
4 participants