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

*: share etcd client from domain for autoid allocator #46647

Merged
merged 22 commits into from
Nov 6, 2023

Conversation

tiancaiamao
Copy link
Contributor

@tiancaiamao tiancaiamao commented Sep 4, 2023

What problem does this PR solve?

Issue Number: close #46324

Problem Summary:

The autoid allocate service need a etcd client, we can create one and close it after use.
But every time infoschema reload, we need to create one...
A better solution is to share the etcd client in domain.Domain (also ddl.DDL)

What is changed and how it works?

Refactor the auto id parameter from kv.Store to autoid.Requirement
The autoid.Requirement now consists of a kv.Store and a clientv3.Client...
This change affect quite a lot packages, especially tools packages.

Check List

Tests

This is a code refactor so all the old tests should not be break.

  • 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

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

None

@ti-chi-bot
Copy link

ti-chi-bot bot commented Sep 4, 2023

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-triage-completed release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/invalid-title do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 4, 2023
@tiprow
Copy link

tiprow bot commented Sep 4, 2023

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/test-infra repository.

@ti-chi-bot ti-chi-bot bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. do-not-merge/needs-triage-completed labels Sep 5, 2023
@tiancaiamao
Copy link
Contributor Author

/ok-to-test

@ti-chi-bot ti-chi-bot bot added the ok-to-test Indicates a PR is ready to be tested. label Sep 5, 2023
@tiancaiamao tiancaiamao marked this pull request as ready for review September 5, 2023 06:12
@ti-chi-bot ti-chi-bot bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 5, 2023
@tiancaiamao tiancaiamao changed the title Autoid etcdcli *: share etcd client from domain for autoid allocator Sep 5, 2023
@tiancaiamao
Copy link
Contributor Author

/ok-to-test

@codecov
Copy link

codecov bot commented Sep 5, 2023

Codecov Report

Merging #46647 (dc56cb0) into master (028d7b8) will increase coverage by 1.2924%.
Report is 28 commits behind head on master.
The diff coverage is 55.7692%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #46647        +/-   ##
================================================
+ Coverage   71.5384%   72.8309%   +1.2924%     
================================================
  Files          1402       1425        +23     
  Lines        406159     412790      +6631     
================================================
+ Hits         290560     300639     +10079     
+ Misses        95775      93251      -2524     
+ Partials      19824      18900       -924     
Flag Coverage Δ
integration 43.1580% <45.0000%> (?)
unit 71.4626% <53.8461%> (-0.0759%) ⬇️

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

Components Coverage Δ
dumpling 53.9874% <ø> (ø)
parser ∅ <ø> (∅)
br 48.6628% <40.6250%> (-4.2323%) ⬇️

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Nov 6, 2023
Copy link

ti-chi-bot bot commented Nov 6, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-11-03 02:50:14.966118871 +0000 UTC m=+3180612.553229000: ☑️ agreed by lcwangchao.
  • 2023-11-06 01:16:25.003878991 +0000 UTC m=+3434182.590989140: ☑️ agreed by GMHDBJD.

Copy link
Contributor

@3pointer 3pointer left a comment

Choose a reason for hiding this comment

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

br part LGTM

Copy link

ti-chi-bot bot commented Nov 6, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 3pointer, GMHDBJD, lcwangchao, tangenta

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 the approved label Nov 6, 2023
Copy link

ti-chi-bot bot commented Nov 6, 2023

[FORMAT CHECKER NOTIFICATION]

Notice: To remove the do-not-merge/needs-tests-checked label, please finished the tests then check the finished items in description.

For example:

Tests

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

📖 For more info, you can check the "Contribute Code" section in the development guide.

@tiancaiamao
Copy link
Contributor Author

/test mysql-test

Copy link

tiprow bot commented Nov 6, 2023

@tiancaiamao: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test tiprow_fast_test

Use /test all to run all jobs.

In response to this:

/test mysql-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.

@ti-chi-bot ti-chi-bot bot merged commit 4979e99 into pingcap:master Nov 6, 2023
@ti-chi-bot
Copy link
Member

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

@ti-chi-bot
Copy link
Member

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

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Nov 6, 2023
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

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

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-6.5 Should cherry pick this PR to release-6.5 branch. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. ok-to-test Indicates a PR is ready to be tested. release-note-none Denotes a PR that doesn't merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

etcd client leak when a table uses AUTO_ID_CACHE=1 and auto_increment
7 participants