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: support keyspace has own auto id leader #46285

Merged
merged 3 commits into from
Aug 25, 2023

Conversation

ystaticy
Copy link
Contributor

@ystaticy ystaticy commented Aug 21, 2023

What problem does this PR solve?

Issue Number: ref #46286

Problem Summary:

What is changed and how it works?

Add keyspace prefix to the etcd path of the autoid leader for each keyspace.

Check List

Tests

  • Manual test (add detailed scripts or steps below)
    Every keyspace has its own auto id leader.
    keyspace-name="ks1"
["get owner"] [keyspaceName=ks1] ["owner info"="[autoid] tidb/autoid/leader ownerManager 127.0.0.1:40573"] ["owner key"=tidb/autoid/leader/2d808a2698157607] [ownerID=127.0.0.1:40573] [op=none]

keyspace-name="ks2"

["get owner"] [keyspaceName=ks2] ["owner info"="[autoid] tidb/autoid/leader ownerManager 127.0.0.1:40583"] ["owner key"=tidb/autoid/leader/7618a2698157738] [ownerID=127.0.0.1:40583] [op=none]

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.

Support keyspace has own auto id leader.

Signed-off-by: y_static_y@sina.com <y_static_y@sina.com>
@ti-chi-bot ti-chi-bot bot added do-not-merge/invalid-title do-not-merge/needs-linked-issue release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Aug 21, 2023
@tiprow
Copy link

tiprow bot commented Aug 21, 2023

Hi @ystaticy. 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.

@ystaticy ystaticy changed the title support keyspace has own auto id leader autoid_service: support keyspace has own auto id leader Aug 21, 2023
@ti-chi-bot ti-chi-bot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/invalid-title do-not-merge/needs-linked-issue release-note-none Denotes a PR that doesn't merit a release note. labels Aug 21, 2023
@codecov
Copy link

codecov bot commented Aug 21, 2023

Codecov Report

Merging #46285 (eecc3bd) into master (9411e82) will decrease coverage by 0.0638%.
Report is 42 commits behind head on master.
The diff coverage is 0.0000%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #46285        +/-   ##
================================================
- Coverage   73.3854%   73.3217%   -0.0638%     
================================================
  Files          1285       1319        +34     
  Lines        394836     407005     +12169     
================================================
+ Hits         289752     298423      +8671     
- Misses        86633      90017      +3384     
- Partials      18451      18565       +114     
Flag Coverage Δ
integration 26.3857% <0.0000%> (?)
unit 73.9895% <0.0000%> (+0.6041%) ⬆️

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

Components Coverage Δ
dumpling 54.0444% <ø> (ø)
parser 85.0810% <ø> (+0.0143%) ⬆️
br 48.3551% <ø> (-3.8647%) ⬇️

Signed-off-by: y_static_y@sina.com <y_static_y@sina.com>
Signed-off-by: y_static_y@sina.com <y_static_y@sina.com>
@ti-chi-bot ti-chi-bot bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Aug 22, 2023
@ystaticy
Copy link
Contributor Author

/test mysql-test

@tiprow
Copy link

tiprow bot commented Aug 24, 2023

@ystaticy: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

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.

@tiancaiamao
Copy link
Contributor

/ok-to-test

@ti-chi-bot ti-chi-bot bot added the ok-to-test Indicates a PR is ready to be tested. label Aug 24, 2023
@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Aug 24, 2023
@ti-chi-bot
Copy link

ti-chi-bot bot commented Aug 24, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tangenta, 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:
  • OWNERS [tangenta,tiancaiamao]

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 Aug 24, 2023
@ti-chi-bot
Copy link

ti-chi-bot bot commented Aug 24, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-08-24 08:28:13.475368874 +0000 UTC m=+1397258.024384846: ☑️ agreed by tangenta.
  • 2023-08-24 08:28:37.399819383 +0000 UTC m=+1397281.948835369: ☑️ agreed by tiancaiamao.

@wuhuizuo
Copy link
Contributor

/retest

1 similar comment
@ystaticy
Copy link
Contributor Author

/retest

@ti-chi-bot ti-chi-bot bot merged commit 21e54f3 into pingcap:master Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm ok-to-test Indicates a PR is ready to be tested. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

4 participants