Skip to content

Conversation

Tristan1900
Copy link
Contributor

@Tristan1900 Tristan1900 commented Jun 9, 2025

What problem does this PR solve?

Issue Number: close #61578

Problem Summary:

What changed and how does it work?

Increase the usability for the latest parallel restore feature
User often retry restore without specifying restoredTS, it will result in an error that might be confusing to user. Now we will auto detect such cases and potentially reuse task by doing following things:

  1. if user specify a restoredTS, we will directly use that ts
  2. if not, we will try to find the task that only differs in restoredTS in the registry.
    2.1 if the task if pasued, use the restoreTS in this task and try to resume it (in transaction will make sure task has not changed)
    2.2 if task is running, it could potentially be a orphan task, we wait for 5 minutes to see if its heartbeat changed, if not we pause it, use its restoreTS and goes to the normal flow of resuming it. If heartbeat changed, we directly go to the next step and will bail out because filter matches.

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

@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/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed do-not-merge/needs-tests-checked labels Jun 9, 2025
Copy link

tiprow bot commented Jun 9, 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.

Copy link

codecov bot commented Jun 9, 2025

Codecov Report

Attention: Patch coverage is 64.97890% with 83 lines in your changes missing coverage. Please review.

Project coverage is 74.7493%. Comparing base (f46112d) to head (5505d63).
Report is 1 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #61610        +/-   ##
================================================
+ Coverage   73.1012%   74.7493%   +1.6480%     
================================================
  Files          1730       1746        +16     
  Lines        481253     481563       +310     
================================================
+ Hits         351802     359965      +8163     
+ Misses       107913      99304      -8609     
- Partials      21538      22294       +756     
Flag Coverage Δ
integration 46.0964% <64.9789%> (?)
unit 72.3206% <0.0000%> (-0.0218%) ⬇️

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

Components Coverage Δ
dumpling 52.7804% <ø> (ø)
parser ∅ <ø> (∅)
br 62.7155% <64.9789%> (+15.7495%) ⬆️
🚀 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.

@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 Jun 9, 2025
Signed-off-by: Wenqi Mou <[email protected]>
Signed-off-by: Wenqi Mou <[email protected]>
@Tristan1900
Copy link
Contributor Author

/retest

Copy link

tiprow bot commented Jun 10, 2025

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

@BornChanger BornChanger requested review from Leavrth and 3pointer and removed request for Leavrth June 10, 2025 06:42
@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jun 10, 2025
@Tristan1900
Copy link
Contributor Author

/hold

@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 Jun 10, 2025
@Tristan1900 Tristan1900 changed the title br: clean up stale registered running tasks br: resume task that only differs in RestoredTS Jun 13, 2025
Copy link
Contributor

@3pointer 3pointer 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 Jun 16, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 3pointer, 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 Jun 16, 2025
Copy link

ti-chi-bot bot commented Jun 16, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-06-10 07:34:33.575459249 +0000 UTC m=+340451.803774506: ☑️ agreed by Leavrth.
  • 2025-06-16 21:27:13.392144348 +0000 UTC m=+134286.115323330: ☑️ agreed by 3pointer.

@Tristan1900
Copy link
Contributor Author

/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 Jun 16, 2025
@ti-chi-bot ti-chi-bot bot merged commit e8aa60d into pingcap:master Jun 16, 2025
25 checks passed
@Tristan1900
Copy link
Contributor Author

/cherrypick release-8.5-20250114-v8.5.0

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Jun 16, 2025
@ti-chi-bot
Copy link
Member

@Tristan1900: new pull request created to branch release-8.5-20250114-v8.5.0: #61763.
But this PR has conflicts, please resolve them!

In response to this:

/cherrypick release-8.5-20250114-v8.5.0

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 ti-community-infra/tichi repository.

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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

After br node oom and restart restore task, restore failed and prompt:'task with ID 1 already exists and is running'
5 participants