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: do not reference owner_id for specific system DDL #53332

Merged
merged 2 commits into from
May 16, 2024

Conversation

tangenta
Copy link
Contributor

@tangenta tangenta commented May 16, 2024

What problem does this PR solve?

Issue Number: close #53327

Problem Summary:

In #53234, TiDB fails to execute below upgrade DDL, because it needs to access owner_id from tidb_mdl_info.

ALTER TABLE mysql.tidb_mdl_info ADD COLUMN owner_id VARCHAR(64) NOT NULL DEFAULT '';

What changed and how does it work?

For the DDLs related to system tables, we skip using owner_id field to prevent above DDL failed.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
    1. Prepare a v8.0.0 cluster.
    2. Kill v8.0.0 TiDB server.
    3. Start latest(compiled from this PR) TiDB server.
    4. Execute upgrade process normally. It can also serve users' DDL.
  • 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.

Since this bug is not released to any versions, release-note is not necessary.

@ti-chi-bot ti-chi-bot bot added 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. labels May 16, 2024
Copy link

tiprow bot commented May 16, 2024

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

@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 release-note-none Denotes a PR that doesn't merit a release note. labels May 16, 2024
Copy link

codecov bot commented May 16, 2024

Codecov Report

Attention: Patch coverage is 68.00000% with 8 lines in your changes are missing coverage. Please review.

Project coverage is 74.4894%. Comparing base (cc127c1) to head (c97a7ce).
Report is 3 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #53332        +/-   ##
================================================
+ Coverage   74.4290%   74.4894%   +0.0604%     
================================================
  Files          1497       1498         +1     
  Lines        356920     430892     +73972     
================================================
+ Hits         265652     320969     +55317     
- Misses        71938      89971     +18033     
- Partials      19330      19952       +622     
Flag Coverage Δ
integration 48.7288% <48.0000%> (?)

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

Components Coverage Δ
dumpling 53.9957% <ø> (-2.3014%) ⬇️
parser ∅ <ø> (∅)
br 50.4482% <ø> (+7.4895%) ⬆️

@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels May 16, 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 16, 2024
@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels May 16, 2024
@tangenta tangenta changed the title ddl: do not reference owner_id for system DDL ddl: do not reference owner_id for specific system DDL May 16, 2024
Copy link

ti-chi-bot bot commented May 16, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lance6716, 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 lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels May 16, 2024
Copy link

ti-chi-bot bot commented May 16, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-05-16 08:58:00.933089153 +0000 UTC m=+1730034.690224726: ☑️ agreed by wjhuang2016.
  • 2024-05-16 09:20:56.030094533 +0000 UTC m=+1731409.787230104: ☑️ agreed by lance6716.

@ti-chi-bot ti-chi-bot bot merged commit 0875abd into pingcap:master May 16, 2024
22 of 23 checks passed
@ti-chi-bot
Copy link
Member

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

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 Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade TiDB failed: unknown column 'owner_id' in field list
4 participants