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: fix Log Backup unexpected paused when adding a already long-running task #53695

Merged
merged 18 commits into from
Jun 11, 2024

Conversation

RidRisR
Copy link
Contributor

@RidRisR RidRisR commented May 31, 2024

What problem does this PR solve?

Issue Number: close #53561

Problem Summary:

What changed and how does it work?

Now, advancer will sync checkpoint with pd when adding a new task

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.

Fix Log Backup unexpected paused when adding a long-run task

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-tests-checked release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/needs-triage-completed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed do-not-merge/needs-tests-checked labels May 31, 2024
Copy link

tiprow bot commented May 31, 2024

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

@RidRisR RidRisR changed the title br: fix Log Backup unexpected paused when adding a long-run task br: fix Log Backup unexpected paused when adding a already long-running task May 31, 2024
Copy link

codecov bot commented May 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 56.3560%. Comparing base (df64c34) to head (ade28a2).
Report is 92 commits behind head on master.

Additional details and impacted files
@@                Coverage Diff                @@
##             master     #53695         +/-   ##
=================================================
- Coverage   72.4222%   56.3560%   -16.0662%     
=================================================
  Files          1505       1630        +125     
  Lines        430553     616844     +186291     
=================================================
+ Hits         311816     347629      +35813     
- Misses        99427     245109     +145682     
- Partials      19310      24106       +4796     
Flag Coverage Δ
integration 24.1904% <63.6363%> (?)
unit 71.4456% <100.0000%> (+0.0441%) ⬆️

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

Components Coverage Δ
dumpling 52.9656% <ø> (-1.0302%) ⬇️
parser ∅ <ø> (∅)
br 60.7011% <100.0000%> (+19.3140%) ⬆️

@RidRisR
Copy link
Contributor Author

RidRisR commented May 31, 2024

/test check-dev2

Copy link

tiprow bot commented May 31, 2024

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

In response to this:

/test check-dev2

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.

@RidRisR RidRisR requested review from 3pointer and YuJuncen June 3, 2024 06:24
@RidRisR
Copy link
Contributor Author

RidRisR commented Jun 3, 2024

/test pull-br-integration-test

Copy link

tiprow bot commented Jun 3, 2024

@RidRisR: 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-sigs/prow repository.

@ti-chi-bot ti-chi-bot added the needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. label Jun 5, 2024
@RidRisR RidRisR requested a review from BornChanger June 7, 2024 03:59
Copy link
Contributor

@YuJuncen YuJuncen 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

br/pkg/streamhelper/advancer.go Outdated Show resolved Hide resolved
adv.StartTaskListener(ctx)
require.NoError(t, adv.OnTick(ctx))
require.NoError(t, adv.OnTick(ctx))
require.NoError(t, adv.OnTick(ctx))
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add some comments about how these tree OnTicks verify the task wasn't paused?

Copy link
Contributor Author

@RidRisR RidRisR Jun 11, 2024

Choose a reason for hiding this comment

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

The first time is to check there is no error before update global checkpoint
The second time is to check there is no error after update global checkpoint
The third time is redundant to check if there is any other potential problems

@ti-chi-bot ti-chi-bot bot added the approved label Jun 7, 2024
br/pkg/streamhelper/advancer.go Show resolved Hide resolved
Copy link

ti-chi-bot bot commented Jun 11, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 3pointer, 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:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@BornChanger
Copy link
Contributor

/retest

Copy link

tiprow bot commented Jun 11, 2024

@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-sigs/prow repository.

@RidRisR
Copy link
Contributor Author

RidRisR commented Jun 11, 2024

/test mysql-test

@RidRisR
Copy link
Contributor Author

RidRisR commented Jun 11, 2024

/test pull-br-integration-test

Copy link

tiprow bot commented Jun 11, 2024

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

In response to this:

/test mysql-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-sigs/prow repository.

Copy link

tiprow bot commented Jun 11, 2024

@RidRisR: 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-sigs/prow repository.

@BornChanger
Copy link
Contributor

/retest

Copy link

tiprow bot commented Jun 11, 2024

@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-sigs/prow repository.

@RidRisR
Copy link
Contributor Author

RidRisR commented Jun 11, 2024

/test pull-br-integration-test

Copy link

tiprow bot commented Jun 11, 2024

@RidRisR: 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-sigs/prow repository.

@ti-chi-bot ti-chi-bot bot merged commit 64f5427 into pingcap:master Jun 11, 2024
22 checks passed
ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Jun 11, 2024
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

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

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Jun 11, 2024
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

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

@ti-chi-bot
Copy link
Member

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

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Jun 11, 2024
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Jun 11, 2024
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

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

ti-chi-bot bot pushed a commit that referenced this pull request Jun 12, 2024
ti-chi-bot bot pushed a commit that referenced this pull request Jul 5, 2024
ti-chi-bot bot pushed a commit that referenced this pull request Jul 18, 2024
ti-chi-bot bot pushed a commit that referenced this pull request Jul 18, 2024
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-6.5 Should cherry pick this PR to release-6.5 branch. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Log Backup being paused due to a false positive in the automatic lag check.
6 participants