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: fix the primary key in index is not in restored format (#53118) #57999

Merged

Conversation

ti-chi-bot
Copy link
Member

@ti-chi-bot ti-chi-bot commented Dec 5, 2024

This is an automated cherry-pick of #53118

What problem does this PR solve?

Issue Number: close #58036 #52510

Problem Summary:
when fast reorg and new collation are enabled, index backfilling only considers the need to restore the index columns, but ignores the primary key columns. The result is that the primary key in the index is not restored.

What changed and how does it work?

When considering the need to restore an index, check both the index columns and the primary key columns.

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.

- Fix the collation of the primary key in secondary indexes is wrong when tidb_ddl_enable_fast_reorg is enabled

@ti-chi-bot ti-chi-bot added 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. type/cherry-pick-for-release-7.1 This PR is cherry-picked to release-7.1 from a source PR. labels Dec 5, 2024
@ti-chi-bot ti-chi-bot bot added do-not-merge/cherry-pick-not-approved size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Dec 5, 2024
@sre-bot
Copy link
Contributor

sre-bot commented Dec 5, 2024

CLA assistant check
All committers have signed the CLA.

@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 5, 2024
@CbcWestwolf CbcWestwolf force-pushed the cherry-pick-53118-to-release-7.1 branch from 9c9bf1b to 793e2e0 Compare December 5, 2024 07:11
@CbcWestwolf
Copy link
Member

/retest

@CbcWestwolf CbcWestwolf force-pushed the cherry-pick-53118-to-release-7.1 branch from 793e2e0 to 783f9ed Compare December 5, 2024 08:22
@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Dec 5, 2024
Copy link

codecov bot commented Dec 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (release-7.1@46e9c73). Learn more about missing BASE report.

Additional details and impacted files
@@               Coverage Diff                @@
##             release-7.1     #57999   +/-   ##
================================================
  Coverage               ?   73.4680%           
================================================
  Files                  ?       1213           
  Lines                  ?     382071           
  Branches               ?          0           
================================================
  Hits                   ?     280700           
  Misses                 ?      83447           
  Partials               ?      17924           

@ti-chi-bot ti-chi-bot bot added cherry-pick-approved Cherry pick PR approved by release team. and removed do-not-merge/cherry-pick-not-approved labels Dec 6, 2024
@Benjamin2037
Copy link
Collaborator

/approve

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

ti-chi-bot bot commented Dec 6, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-12-05 09:42:30.686706327 +0000 UTC m=+1320738.306360838: ☑️ agreed by CbcWestwolf.
  • 2024-12-06 03:17:57.207075726 +0000 UTC m=+1384064.826730241: ☑️ agreed by fzzf678.

Copy link
Collaborator

@Benjamin2037 Benjamin2037 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

ti-chi-bot bot commented Dec 6, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Benjamin2037, CbcWestwolf, fzzf678

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 [Benjamin2037,CbcWestwolf]

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 merged commit 0e847c3 into pingcap:release-7.1 Dec 6, 2024
9 checks passed
@CbcWestwolf CbcWestwolf deleted the cherry-pick-53118-to-release-7.1 branch December 6, 2024 07:50
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 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. type/cherry-pick-for-release-7.1 This PR is cherry-picked to release-7.1 from a source PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants