Skip to content

*: add global variable @@tidb_cache_table_lease for cached table#31018

Merged
ti-chi-bot merged 24 commits intopingcap:masterfrom
tiancaiamao:lease-variable
Jan 1, 2022
Merged

*: add global variable @@tidb_cache_table_lease for cached table#31018
ti-chi-bot merged 24 commits intopingcap:masterfrom
tiancaiamao:lease-variable

Conversation

@tiancaiamao
Copy link
Contributor

What problem does this PR solve?

Issue Number: close #29485

A subtask of #25293

Problem Summary:

What is changed and how it works?

Introduce a global session variable @@tidb_cache_table_lease for cached table's read lock lease.
The valid value range is 1-10s and default value is 3s

Tiny refactor UpdateLockForRead function,
Other function signature change is used to adapt the lease duration parameter.

Check List

Tests

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

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

None

@tiancaiamao tiancaiamao requested a review from a team as a code owner December 24, 2021 11:36
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Dec 24, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • lcwangchao
  • tangenta

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 release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 24, 2021
@tiancaiamao
Copy link
Contributor Author

/run-unit-test

@tiancaiamao
Copy link
Contributor Author

/run-unit-test

@sre-bot
Copy link
Contributor

sre-bot commented Dec 24, 2021

@tiancaiamao tiancaiamao mentioned this pull request Dec 27, 2021
32 tasks
@tiancaiamao
Copy link
Contributor Author

/run-check_dev_2

@tiancaiamao
Copy link
Contributor Author

/run-check_dev_2

@ti-chi-bot ti-chi-bot added status/LGT1 Indicates that a PR has LGTM 1. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Dec 31, 2021
@ti-chi-bot ti-chi-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 31, 2021
@ti-chi-bot ti-chi-bot removed the status/LGT1 Indicates that a PR has LGTM 1. label Dec 31, 2021
@ti-chi-bot ti-chi-bot added the status/LGT2 Indicates that a PR has LGTM 2. label Dec 31, 2021
@tiancaiamao
Copy link
Contributor Author

/merge

@ti-chi-bot
Copy link
Member

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

DetailsCommit hash: 84133ad

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Dec 31, 2021
@tiancaiamao
Copy link
Contributor Author

/merge

@tiancaiamao
Copy link
Contributor Author

/rebuild

@morgo morgo self-requested a review December 31, 2021 14:59
@morgo
Copy link
Contributor

morgo commented Dec 31, 2021

/merge

@ti-chi-bot
Copy link
Member

@tiancaiamao: 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.

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

@ti-chi-bot ti-chi-bot merged commit 1127977 into pingcap:master Jan 1, 2022
@tiancaiamao tiancaiamao deleted the lease-variable branch January 2, 2022 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note-none Denotes a PR that doesn't merit a release note. 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.

Make the lease time configurable

6 participants