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: PiTR table filter online support #59281

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Tristan1900
Copy link
Contributor

@Tristan1900 Tristan1900 commented Feb 7, 2025

What problem does this PR solve?

Issue Number: close #59280

Problem Summary:

What changed and how does it work?

Make sure when user wants to use PiTR table filter to restore to an online cluster, the flag --online is specified.

  1. Figure out all the tables needed for the entire PiTR at snapshot restore phase, and check current cluster to see any table exist so error out early.
  2. For tables created during snapshot backup, set tableMode to restore to block any user op
  3. Make sure to populate table name to final state for renamed tables to avoid any table name conflicts.
  4. During log replay at log restore phase, set all tableInfo to restoreMode and set table name to final name as well
  5. After restore finishes, set tableMode back to normal mode, so it can unblock user op and fetches the latest value from TiKV written by the log restore.

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

Copy link

ti-chi-bot bot commented Feb 7, 2025

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-tests-checked release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. sig/planner SIG: Planner size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Feb 7, 2025
Copy link

ti-chi-bot bot commented Feb 7, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign ailinkid, wjhuang2016, yujuncen for approval, ensuring that each of them provides their approval before proceeding. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

Copy link

tiprow bot commented Feb 7, 2025

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

@Tristan1900 Tristan1900 force-pushed the table-filter-online branch from 7309304 to 0d4d25e Compare March 3, 2025 23:34
@Tristan1900 Tristan1900 marked this pull request as ready for review March 3, 2025 23:34
@ti-chi-bot ti-chi-bot bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 3, 2025
Copy link

codecov bot commented Mar 3, 2025

Codecov Report

Attention: Patch coverage is 74.29112% with 136 lines in your changes missing coverage. Please review.

Project coverage is 74.4271%. Comparing base (0a109e9) to head (dbd5985).
Report is 1 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #59281        +/-   ##
================================================
+ Coverage   73.1153%   74.4271%   +1.3118%     
================================================
  Files          1702       1748        +46     
  Lines        470060     478426      +8366     
================================================
+ Hits         343686     356079     +12393     
+ Misses       105188      99744      -5444     
- Partials      21186      22603      +1417     
Flag Coverage Δ
integration 46.8548% <74.2424%> (?)

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

Components Coverage Δ
dumpling 52.6910% <ø> (ø)
parser ∅ <ø> (∅)
br 61.7164% <74.2911%> (+14.5131%) ⬆️
🚀 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.

@Tristan1900 Tristan1900 force-pushed the table-filter-online branch from 70cff77 to b1a07db Compare March 8, 2025 17:58
Signed-off-by: Wenqi Mou <[email protected]>
@Tristan1900 Tristan1900 force-pushed the table-filter-online branch 2 times, most recently from e9225a9 to 05b0129 Compare March 8, 2025 18:45
Signed-off-by: Wenqi Mou <[email protected]>
@Tristan1900 Tristan1900 force-pushed the table-filter-online branch from 05b0129 to ac16ebe Compare March 9, 2025 22:17
Signed-off-by: Wenqi Mou <[email protected]>
Copy link

ti-chi-bot bot commented Mar 10, 2025

@Tristan1900: 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
idc-jenkins-ci-tidb/check_dev dbd5985 link true /test check-dev
idc-jenkins-ci-tidb/build dbd5985 link true /test build
pull-unit-test-ddlv1 dbd5985 link true /test pull-unit-test-ddlv1
idc-jenkins-ci-tidb/unit-test dbd5985 link true /test unit-test
idc-jenkins-ci-tidb/check_dev_2 dbd5985 link true /test check-dev2
pull-br-integration-test dbd5985 link true /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-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none Denotes a PR that doesn't merit a release note. sig/planner SIG: Planner 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 online support for PiTR table filer
1 participant