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) #53396

Merged

Conversation

ti-chi-bot
Copy link
Member

This is an automated cherry-pick of #53315

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

Copy link

codecov bot commented May 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (release-8.1@d80e436). Learn more about missing BASE report.

Additional details and impacted files
@@               Coverage Diff                @@
##             release-8.1     #53396   +/-   ##
================================================
  Coverage               ?   71.1571%           
================================================
  Files                  ?       1465           
  Lines                  ?     421429           
  Branches               ?          0           
================================================
  Hits                   ?     299877           
  Misses                 ?     101070           
  Partials               ?      20482           
Flag Coverage Δ
unit 71.1571% <ø> (?)

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

Components Coverage Δ
dumpling 53.9957% <0.0000%> (?)
parser ∅ <0.0000%> (?)
br 40.9536% <0.0000%> (?)

@purelind
Copy link
Contributor

/test ?

Copy link

ti-chi-bot bot commented May 20, 2024

@purelind: The following commands are available to trigger required jobs:

  • /test build
  • /test check-dev
  • /test check-dev2
  • /test mysql-test
  • /test unit-test

The following commands are available to trigger optional jobs:

  • /test pull-br-integration-test
  • /test pull-lightning-integration-test

Use /test all to run the following jobs that were automatically triggered:

  • pingcap/tidb/release-8.1/ghpr_build
  • pingcap/tidb/release-8.1/ghpr_check
  • pingcap/tidb/release-8.1/ghpr_check2
  • pingcap/tidb/release-8.1/ghpr_mysql_test
  • pingcap/tidb/release-8.1/ghpr_unit_test

In response to this:

/test ?

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.

Copy link

tiprow bot commented May 20, 2024

@purelind: No presubmit jobs available for pingcap/tidb@release-8.1

In response to this:

/test ?

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.

@purelind
Copy link
Contributor

/test check-dev2

Copy link

tiprow bot commented May 20, 2024

@purelind: No presubmit jobs available for pingcap/tidb@release-8.1

In response to this:

/test check-dev2

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.

@tiancaiamao tiancaiamao requested review from Defined2014, bb7133 and tiancaiamao and removed request for bb7133 May 20, 2024 10:06
Copy link

ti-chi-bot bot commented May 20, 2024

[APPROVALNOTIFIER] This PR is APPROVED

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

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

Copy link

ti-chi-bot bot commented May 20, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-05-20 10:06:43.225464756 +0000 UTC m=+2079756.982600330: ☑️ agreed by tiancaiamao.
  • 2024-05-20 10:10:43.381850019 +0000 UTC m=+2079997.138985589: ☑️ agreed by Defined2014.

@Defined2014
Copy link
Contributor

/retest

@ti-chi-bot ti-chi-bot bot merged commit 9e5c591 into pingcap:release-8.1 May 20, 2024
18 checks passed
@wuhuizuo wuhuizuo deleted the cherry-pick-53315-to-release-8.1 branch May 20, 2024 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved cherry-pick-approved Cherry pick PR approved by release team. lgtm release-note-none size/S Denotes a PR that changes 10-29 lines, ignoring generated files. type/cherry-pick-for-release-8.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants