pingcap / tidb

TiDB is an open-source, cloud-native, distributed, MySQL-Compatible database for elastic scale and real-time analytics. Try AI-powered Chat2Query free at : https://www.pingcap.com/tidb-serverless/
https://pingcap.com
Apache License 2.0
36.39k stars 5.73k forks source link

backup: watch store state and retry backup immediately #53341

Closed 3pointer closed 1 week ago

3pointer commented 1 month ago

What problem does this PR solve?

Issue Number: close https://github.com/pingcap/tidb/issues/52534 close https://github.com/pingcap/tidb/issues/53519 Problem Summary:

What changed and how does it work?

  1. reuse storewatch to observe store change event to retry backup.
  2. refine main backup code for easy to test.

Check List

Tests

Side effects

Documentation

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None
ti-chi-bot[bot] commented 1 month ago

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

3pointer commented 1 month ago

/ok-to-test

tiprow[bot] commented 1 month ago

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](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
3pointer commented 1 month ago

/test pull-br-integration-test

tiprow[bot] commented 1 month ago

@3pointer: The specified target(s) for /test were not found. The following commands are available to trigger required jobs:

Use /test all to run all jobs.

In response to [this](https://github.com/pingcap/tidb/pull/53341#issuecomment-2116501133): >/test pull-br-integration-test Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 81.20000% with 47 lines in your changes missing coverage. Please review.

Project coverage is 56.6870%. Comparing base (b23ac8e) to head (7230ed8). Report is 14 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #53341 +/- ## ================================================= - Coverage 74.4712% 56.6870% -17.7842% ================================================= Files 1506 1628 +122 Lines 358004 605579 +247575 ================================================= + Hits 266610 343285 +76675 - Misses 71987 238730 +166743 - Partials 19407 23564 +4157 ``` | [Flag](https://app.codecov.io/gh/pingcap/tidb/pull/53341/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | Coverage Δ | | |---|---|---| | [integration](https://app.codecov.io/gh/pingcap/tidb/pull/53341/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `38.8245% <79.6000%> (?)` | | | [unit](https://app.codecov.io/gh/pingcap/tidb/pull/53341/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `71.5941% <42.0000%> (-1.7489%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap#carryforward-flags-in-the-pull-request-comment) to find out more. | [Components](https://app.codecov.io/gh/pingcap/tidb/pull/53341/components?src=pr&el=components&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | Coverage Δ | | |---|---|---| | [dumpling](https://app.codecov.io/gh/pingcap/tidb/pull/53341/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `52.9656% <ø> (-2.2339%)` | :arrow_down: | | [parser](https://app.codecov.io/gh/pingcap/tidb/pull/53341/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `∅ <ø> (∅)` | | | [br](https://app.codecov.io/gh/pingcap/tidb/pull/53341/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `61.8814% <81.2000%> (+18.3458%)` | :arrow_up: |
ti-chi-bot[bot] commented 1 week ago

@Leavrth: Your lgtm message is repeated, so it is ignored.

In response to [this](https://github.com/pingcap/tidb/pull/53341#pullrequestreview-2095462085): > Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
3pointer commented 1 week ago

/test unit-test

tiprow[bot] commented 1 week ago

@3pointer: The specified target(s) for /test were not found. The following commands are available to trigger required jobs:

Use /test all to run all jobs.

In response to [this](https://github.com/pingcap/tidb/pull/53341#issuecomment-2147171038): >/test unit-test Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
ti-chi-bot[bot] commented 1 week ago

[APPROVALNOTIFIER] This PR is APPROVED

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

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: - ~~[br/OWNERS](https://github.com/pingcap/tidb/blob/master/br/OWNERS)~~ [Leavrth,YuJuncen] 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[bot] commented 1 week ago

[LGTM Timeline notifier]

Timeline: