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

br: remove duplicate bind info after snapshot restore #48946

Merged
merged 6 commits into from
Dec 10, 2023

Conversation

Leavrth
Copy link
Contributor

@Leavrth Leavrth commented Nov 28, 2023

What problem does this PR solve?

Issue Number: close #46527

Problem Summary:
After snapshot restore, there are duplicated bind infos.

What changed and how does it work?

execute SQL to remove duplicate bind info after snapshot restore.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
+-------------------------------------------+--------------------------------------------------------------+------------+---------+-------------------------+-------------------------+---------+-----------------+---------+------------------------------------------------------------------+-------------+
| original_sql                              | bind_sql                                                     | default_db | status  | create_time             | update_time             | charset | collation       | source  | sql_digest                                                       | plan_digest |
+-------------------------------------------+--------------------------------------------------------------+------------+---------+-------------------------+-------------------------+---------+-----------------+---------+------------------------------------------------------------------+-------------+
| builtin_pseudo_sql_for_bind_lock          | builtin_pseudo_sql_for_bind_lock                             | mysql      | builtin | 0000-00-00 00:00:00.000 | 0000-00-00 00:00:00.000 |         |                 | builtin | NULL                                                             | NULL        |
| select * from `test` . `t1` where `b` = ? | SELECT * FROM `test`.`t1` IGNORE INDEX (`b`) WHERE `b` = 123 | test       | enabled | 2023-11-20 16:22:22.239 | 2023-11-20 16:22:22.239 | utf8    | utf8_general_ci | manual  | 94c28782ed1110d4cf67f3a836f92d110a0ebe69113e8d9e1ff5c86523905a3e |             |
+-------------------------------------------+--------------------------------------------------------------+------------+---------+-------------------------+-------------------------+---------+-----------------+---------+------------------------------------------------------------------+-------------+
  • 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. do-not-merge/needs-tests-checked size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed do-not-merge/needs-tests-checked labels Nov 28, 2023
Copy link

tiprow bot commented Nov 28, 2023

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/test-infra repository.

Copy link

codecov bot commented Nov 28, 2023

Codecov Report

Merging #48946 (a075986) into master (ac20c56) will increase coverage by 2.2734%.
Report is 6 commits behind head on master.
The diff coverage is 13.6363%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #48946        +/-   ##
================================================
+ Coverage   71.0545%   73.3279%   +2.2734%     
================================================
  Files          1368       1410        +42     
  Lines        402073     415862     +13789     
================================================
+ Hits         285691     304943     +19252     
+ Misses        96510      91280      -5230     
+ Partials      19872      19639       -233     
Flag Coverage Δ
integration 46.8620% <13.6363%> (?)
unit 71.0562% <ø> (+0.0017%) ⬆️

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

Components Coverage Δ
dumpling 53.9663% <ø> (ø)
parser ∅ <ø> (∅)
br 57.9367% <13.6363%> (+4.9855%) ⬆️

@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 Nov 28, 2023
Signed-off-by: Leavrth <[email protected]>
br/pkg/restore/systable_restore.go Outdated Show resolved Hide resolved
@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Dec 5, 2023
@Leavrth
Copy link
Contributor Author

Leavrth commented Dec 8, 2023

/test pull-br-integration-test

Copy link

tiprow bot commented Dec 8, 2023

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

In response to this:

/test pull-br-integration-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.

@Leavrth
Copy link
Contributor Author

Leavrth commented Dec 8, 2023

/test pull-br-integration-test

Copy link

tiprow bot commented Dec 8, 2023

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

In response to this:

/test pull-br-integration-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.

Copy link

ti-chi-bot bot commented Dec 8, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 3pointer, BornChanger

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 Dec 8, 2023
Copy link

ti-chi-bot bot commented Dec 8, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-12-05 10:35:33.741293425 +0000 UTC m=+1523762.406519783: ☑️ agreed by 3pointer.
  • 2023-12-08 08:22:40.341173303 +0000 UTC m=+1774989.006399499: ☑️ agreed by BornChanger.

@BornChanger
Copy link
Contributor

/retest

Copy link

tiprow bot commented Dec 10, 2023

@BornChanger: 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/test-infra repository.

Copy link

ti-chi-bot bot commented Dec 10, 2023

@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
pull-br-integration-test a075986 link false /test pull-br-integration-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.

@ti-chi-bot ti-chi-bot bot merged commit e62699c into pingcap:master Dec 10, 2023
20 of 21 checks passed
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/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.

Duplicated records in mysql.bind_info after restoring from a full backup
3 participants