Skip to content

Conversation

Leavrth
Copy link
Contributor

@Leavrth Leavrth commented Jul 15, 2025

What problem does this PR solve?

Issue Number: close #61642

Problem Summary:
repair index should drop the index at first, but there is a foreign key is needed in it to prevent it from being dropped.

What changed and how does it work?

drop foreign keys before repair indexes, and finally add back them

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

Signed-off-by: Jianjun Liao <[email protected]>
@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-tests-checked do-not-merge/needs-triage-completed 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. and removed do-not-merge/needs-tests-checked labels Jul 15, 2025
Copy link

tiprow bot commented Jul 15, 2025

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

Copy link

codecov bot commented Jul 15, 2025

Codecov Report

❌ Patch coverage is 78.26087% with 40 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.6372%. Comparing base (8d1a00e) to head (162a11e).
⚠️ Report is 4 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #62418        +/-   ##
================================================
+ Coverage   72.7835%   74.6372%   +1.8537%     
================================================
  Files          1831       1848        +17     
  Lines        495392     497029      +1637     
================================================
+ Hits         360564     370969     +10405     
+ Misses       112905     103465      -9440     
- Partials      21923      22595       +672     
Flag Coverage Δ
integration 45.9197% <62.5000%> (?)
unit 72.4030% <74.4565%> (+0.1488%) ⬆️

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

Components Coverage Δ
dumpling 52.8700% <ø> (ø)
parser ∅ <ø> (∅)
br 63.3522% <78.2608%> (+16.9987%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: Jianjun Liao <[email protected]>
@ti-chi-bot ti-chi-bot bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jul 17, 2025
@Leavrth
Copy link
Contributor Author

Leavrth commented Jul 17, 2025

/check-issue-triage-complete

Leavrth added 3 commits July 17, 2025 14:45
Signed-off-by: Jianjun Liao <[email protected]>
Signed-off-by: Jianjun Liao <[email protected]>
Signed-off-by: Jianjun Liao <[email protected]>
Signed-off-by: Jianjun Liao <[email protected]>
@Leavrth
Copy link
Contributor Author

Leavrth commented Jul 25, 2025

/retest

Copy link

tiprow bot commented Jul 25, 2025

@Leavrth: 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.

}
fkSqls[i].OldForeignKeyFound = false
fkSqls[i].ForeignKeyUpdated = false
if fromCheckpoint {
Copy link
Contributor

@River2000i River2000i Jul 30, 2025

Choose a reason for hiding this comment

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

just curious, fromCheckpoint means rerun log restore task?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, the last execution may failed after the foreign key is dropped and before the foreign key is recreated.

Comment on lines 34 to 45
type ForeignKeyRecord struct {
ID int64
ChildSchemaNameO string
ChildTableNameO string
ParentSchemaNameO string
ParentTableNameO string
FKNameO string
ChildCols []ast.CIStr
ParentCols []ast.CIStr
OnDelete int
OnUpdate int
}
Copy link
Contributor

Choose a reason for hiding this comment

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

prefer add comment to make sure the fields is consistent with model.FKInfo or use model.FKInfo directly?🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Signed-off-by: Jianjun Liao <[email protected]>
@Leavrth
Copy link
Contributor Author

Leavrth commented Aug 11, 2025

/retest

Copy link

tiprow bot commented Aug 11, 2025

@Leavrth: 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.

Copy link
Contributor

@River2000i River2000i left a comment

Choose a reason for hiding this comment

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

rest LGTM

Copy link

ti-chi-bot bot commented Aug 13, 2025

@River2000i: adding LGTM is restricted to approvers and reviewers in OWNERS files.

In response to this:

rest LGTM

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.

@Tristan1900
Copy link
Contributor

/hold

pending comments from river2000i

@ti-chi-bot ti-chi-bot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 13, 2025
@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Aug 13, 2025
Copy link

ti-chi-bot bot commented Aug 28, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: BornChanger, River2000i, Tristan1900

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 approved lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Aug 28, 2025
Copy link

ti-chi-bot bot commented Aug 28, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-08-13 14:00:22.823421044 +0000 UTC m=+448821.858004272: ☑️ agreed by Tristan1900.
  • 2025-08-28 07:42:53.777216679 +0000 UTC m=+426065.655047633: ☑️ agreed by BornChanger.

Signed-off-by: Jianjun Liao <[email protected]>
@Leavrth
Copy link
Contributor Author

Leavrth commented Aug 28, 2025

/unhold

@ti-chi-bot ti-chi-bot bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 28, 2025
@Leavrth
Copy link
Contributor Author

Leavrth commented Aug 28, 2025

/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 28, 2025
@Leavrth
Copy link
Contributor Author

Leavrth commented Aug 29, 2025

/retest

Copy link

ti-chi-bot bot commented Aug 29, 2025

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

Test name Commit Details Required Rerun command
non-block/pull-unit-test-next-gen 59404cc link false /test pull-unit-test-next-gen
non-block/pull-mysql-client-test-next-gen 59404cc link false /test pull-mysql-client-test-next-gen
non-block/pull-integration-e2e-test-next-gen 59404cc link false /test pull-integration-e2e-test-next-gen
non-block/pull-mysql-test-next-gen 59404cc link false /test pull-mysql-test-next-gen

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.

@Leavrth
Copy link
Contributor Author

Leavrth commented Aug 29, 2025

/retest

Copy link

tiprow bot commented Aug 29, 2025

@Leavrth: 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 162a11e 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.

@ti-chi-bot ti-chi-bot bot merged commit b854521 into pingcap:master Aug 29, 2025
29 of 30 checks passed
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-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.

br: add foreign key op does not work with PiTR
4 participants