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

ddl: combine table/partition/db id allocation with job id #54669

Merged
merged 9 commits into from
Jul 17, 2024

Conversation

D3Hunter
Copy link
Contributor

@D3Hunter D3Hunter commented Jul 16, 2024

What problem does this PR solve?

Issue Number: ref #54436

Problem Summary:

What changed and how does it work?

it's one of the following pr of #54547

  • refactor CreateTableWithInfoConfigurier and related config, now all table created in a single call must all reuse ID or none. and change this part for BR
  • some renaming
  • fix the issue when batch create table, tables might not put into InvolvingSchemaInfo when shared involve is empty
  • combine table/db id allocation with job id

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.

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 ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jul 16, 2024
@D3Hunter D3Hunter mentioned this pull request Jul 16, 2024
54 tasks
Copy link

tiprow bot commented Jul 16, 2024

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

@D3Hunter D3Hunter changed the title ddl: combine table/db id allocation with job id ddl: combine table/partition/db id allocation with job id Jul 16, 2024
Copy link

codecov bot commented Jul 16, 2024

Codecov Report

Attention: Patch coverage is 80.72727% with 53 lines in your changes missing coverage. Please review.

Project coverage is 56.4173%. Comparing base (de54620) to head (45b4ec0).
Report is 8 commits behind head on master.

Additional details and impacted files
@@                Coverage Diff                @@
##             master     #54669         +/-   ##
=================================================
- Coverage   72.7828%   56.4173%   -16.3655%     
=================================================
  Files          1551       1672        +121     
  Lines        436993     610376     +173383     
=================================================
+ Hits         318056     344358      +26302     
- Misses        99358     242361     +143003     
- Partials      19579      23657       +4078     
Flag Coverage Δ
integration 37.9385% <62.2710%> (?)
unit 71.7281% <80.3636%> (-0.0851%) ⬇️

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

Components Coverage Δ
dumpling 52.9656% <ø> (ø)
parser ∅ <ø> (∅)
br 61.8566% <72.4137%> (+15.9941%) ⬆️

Copy link
Contributor

@lance6716 lance6716 left a comment

Choose a reason for hiding this comment

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

maybe rename the ID in function names and comments to GlobalID or something. So we know the table-level ID like column ID is not handled.

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

ti-chi-bot bot commented Jul 17, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-07-17 03:02:45.539962628 +0000 UTC m=+409387.530904168: ☑️ agreed by lance6716.
  • 2024-07-17 03:03:44.066571914 +0000 UTC m=+409446.057513385: ☑️ agreed by wjhuang2016.

Copy link

tiprow bot commented Jul 17, 2024

@D3Hunter: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
fast_test_tiprow 8b4a09a link true /test fast_test_tiprow

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

Copy link

ti-chi-bot bot commented Jul 17, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lance6716, Leavrth, wjhuang2016

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 Jul 17, 2024
for _, table := range tables {
m[table.DB.Name.L] = append(m[table.DB.Name.L], table.Info)
if db.canReuseTableID(table.Info) {
Copy link
Contributor

Choose a reason for hiding this comment

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

It splits the batched tables into idResuableTbls and idNonResuableTbls. I prefer to splits the unbatched tables before here

if rc.batchDdlSize > minBatchDdlSize && len(rc.dbPool) > 0 {

Copy link

ti-chi-bot bot commented Jul 17, 2024

@D3Hunter: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
idc-jenkins-ci-tidb/unit-test 45b4ec0 link unknown /test unit-test

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@D3Hunter
Copy link
Contributor Author

/retest

Copy link

tiprow bot commented Jul 17, 2024

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

In response to this:

/retest

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.

@ti-chi-bot ti-chi-bot bot merged commit e33dbbc into pingcap:master Jul 17, 2024
24 of 26 checks passed
@D3Hunter D3Hunter deleted the combine-id-alloc2 branch July 17, 2024 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants