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

autoid_service: remove the force rebase on close behavior #53315

Merged
merged 1 commit into from
May 17, 2024

Conversation

tiancaiamao
Copy link
Contributor

@tiancaiamao tiancaiamao commented May 16, 2024

What problem does this PR solve?

Issue Number: ref #38442
close #53393

Problem Summary:

What changed and how does it work?

The original design is that we try our best to avoid holes in AUTO_ID_CACHE=1,
so when autoid leader exit, forceRebase is called to return the non-consumed in memory IDs back.

When there are a lot of tables, this operation could not be finish quickly.
And tidb graceful shutdown can not done within 30s. This cause tidb can not restart quickly to provide service.

We think over it and deside to remove the force rebase on close behavior.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

No unit test apply here (it requires tidb restart to cover the changes).
Some integration test may notice the change.

Side effects

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

Documentation

  • Affects user behaviors

Behavior change, not tidb restart can cause hole in auto id allocating using AUTO_ID_CACHE=1

  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

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

None

@ti-chi-bot ti-chi-bot bot added the release-note-none Denotes a PR that doesn't merit a release note. label May 16, 2024
@tiancaiamao tiancaiamao requested a review from bb7133 May 16, 2024 03:41
@ti-chi-bot ti-chi-bot bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label May 16, 2024
Copy link

tiprow bot commented May 16, 2024

Hi @tiancaiamao. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

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-sigs/prow repository.

Copy link

codecov bot commented May 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.5497%. Comparing base (5d27b73) to head (39eee29).
Report is 16 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #53315        +/-   ##
================================================
+ Coverage   72.4973%   74.5497%   +2.0523%     
================================================
  Files          1497       1497                
  Lines        429959     429984        +25     
================================================
+ Hits         311709     320552      +8843     
+ Misses        98996      89535      -9461     
- Partials      19254      19897       +643     
Flag Coverage Δ
integration 48.9945% <ø> (?)
unit 71.3025% <ø> (-0.0919%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 53.9957% <ø> (ø)
parser ∅ <ø> (∅)
br 50.1806% <ø> (+8.7515%) ⬆️

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 bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels May 17, 2024
Copy link

ti-chi-bot bot commented May 17, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bb7133, Defined2014

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

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels May 17, 2024
Copy link

ti-chi-bot bot commented May 17, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-05-17 07:12:10.583660354 +0000 UTC m=+1810084.340795928: ☑️ agreed by bb7133.
  • 2024-05-17 08:45:54.512209004 +0000 UTC m=+1815708.269344574: ☑️ agreed by Defined2014.

@ti-chi-bot ti-chi-bot bot merged commit 4d6715f into pingcap:master May 17, 2024
22 of 23 checks passed
terry1purcell pushed a commit to terry1purcell/tidb that referenced this pull request May 17, 2024
@ti-chi-bot ti-chi-bot added the needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. label May 20, 2024
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.1: #53396.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

forceRebase behavior of AUTO_ID_CACHE=1 cause tidb fail to exit for a long time
4 participants