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: skip fresh check when user has specified --filter in restore full #51010

Merged
merged 5 commits into from
Feb 7, 2024

Conversation

3pointer
Copy link
Contributor

@3pointer 3pointer commented Feb 6, 2024

What problem does this PR solve?

Issue Number: close #51009

Problem Summary:
In previous when user doing a full restore. we add a check to make sure the cluster must be empty. but sometime user want to do a full restore with --filter. at that time we should not check the empty cluster anymore.

What changed and how does it work?

This PR skip the check when user has set the --filter argument manually.

Check List

Tests

  • Unit test

  • Integration test

  • Manual test (add detailed scripts or steps below)
    before this PR
    image
    after this PR
    image

  • 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 issue that makes --filter argument skip empty cluster check during full restore

Copy link

ti-chi-bot bot commented Feb 6, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-triage-completed do-not-merge/needs-tests-checked do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Feb 6, 2024
Copy link

tiprow bot commented Feb 6, 2024

Hi @3pointer. 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.

@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 do-not-merge/needs-tests-checked release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/needs-triage-completed labels Feb 6, 2024
@3pointer 3pointer added needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. and removed do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Feb 6, 2024
@3pointer 3pointer marked this pull request as ready for review February 6, 2024 09:35
Copy link

codecov bot commented Feb 6, 2024

Codecov Report

Merging #51010 (4b7c808) into master (f5e0799) will increase coverage by 0.3675%.
Report is 2 commits behind head on master.
The diff coverage is 66.6666%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #51010        +/-   ##
================================================
+ Coverage   72.2813%   72.6489%   +0.3675%     
================================================
  Files          1467       1467                
  Lines        361854     434919     +73065     
================================================
+ Hits         261553     315964     +54411     
- Misses        80989      99019     +18030     
- Partials      19312      19936       +624     
Flag Coverage Δ
integration 49.1727% <0.0000%> (?)
unit 70.2973% <66.6666%> (-1.8581%) ⬇️

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

Components Coverage Δ
dumpling 54.2940% <ø> (-2.1832%) ⬇️
parser ∅ <ø> (∅)
br 51.2297% <66.6666%> (+4.9433%) ⬆️

// we need check cluster is fresh every time. except restore from a checkpoint.
if client.IsFull() && len(checkpointSetWithTableID) == 0 {
// we need check cluster is fresh every time. except restore from a checkpoint or user has not set filter argument.
if client.IsFull() && !cfg.ExplicitFilter && len(checkpointSetWithTableID) == 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add a case. Other LGTM.

@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Feb 7, 2024
@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Feb 7, 2024
Copy link

ti-chi-bot bot commented Feb 7, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: BornChanger, Leavrth

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 Feb 7, 2024
Copy link

ti-chi-bot bot commented Feb 7, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-02-07 05:40:51.590757947 +0000 UTC m=+335377.157527840: ☑️ agreed by Leavrth.
  • 2024-02-07 07:31:35.324355433 +0000 UTC m=+342020.891125325: ☑️ agreed by BornChanger.

@ti-chi-bot ti-chi-bot bot merged commit 9553bc6 into pingcap:master Feb 7, 2024
31 of 35 checks passed
@ti-chi-bot
Copy link
Member

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

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-7.5 Should cherry pick this PR to release-7.5 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.

Restore still check the empty cluster even when filter is specified
4 participants