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: stop log when full restore failed #51578

Merged
merged 5 commits into from
Mar 12, 2024
Merged

Conversation

Leavrth
Copy link
Contributor

@Leavrth Leavrth commented Mar 7, 2024

What problem does this PR solve?

Issue Number: close #51572

Problem Summary:
too many logs when full restore failed

What changed and how does it work?

stop log when error context canceled

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-triage-completed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 7, 2024
Copy link

tiprow bot commented Mar 7, 2024

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

Copy link

codecov bot commented Mar 7, 2024

Codecov Report

Merging #51578 (42ebaff) into master (7b6fc23) will increase coverage by 2.0156%.
Report is 42 commits behind head on master.
The diff coverage is 100.0000%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #51578        +/-   ##
================================================
+ Coverage   70.7753%   72.7909%   +2.0156%     
================================================
  Files          1464       1473         +9     
  Lines        436300     444665      +8365     
================================================
+ Hits         308793     323676     +14883     
+ Misses       108167     100691      -7476     
- Partials      19340      20298       +958     
Flag Coverage Δ
integration 48.7865% <54.5454%> (?)
unit 70.4518% <45.4545%> (-0.1216%) ⬇️

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

Components Coverage Δ
dumpling 53.9957% <ø> (ø)
parser ∅ <ø> (∅)
br 51.2004% <100.0000%> (+5.3243%) ⬆️

@Leavrth
Copy link
Contributor Author

Leavrth commented Mar 8, 2024

pdclient := mgr.GetPDClient()
cctx, cancel := context.WithCancel(ctx)
cancel()
_, _, err = pdclient.GetTS(cctx)
require.Equal(t, context.Canceled, errors.Cause(err))  // pass 
require.NoError(t, err)  // Received unexpected error:
        	         //   context canceled

It is not grpc context cancel error, so we can retry the grpc context cancel error in pd backoff

br/pkg/utils/backoff.go Outdated Show resolved Hide resolved
@ti-chi-bot ti-chi-bot bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. do-not-merge/needs-triage-completed labels Mar 11, 2024
@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Mar 11, 2024
Copy link

ti-chi-bot bot commented Mar 11, 2024

[APPROVALNOTIFIER] This PR is APPROVED

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

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Mar 11, 2024
Copy link

ti-chi-bot bot commented Mar 11, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-03-11 06:01:03.578685058 +0000 UTC m=+665290.600931447: ☑️ agreed by 3pointer.
  • 2024-03-11 06:49:19.098354254 +0000 UTC m=+668186.120600637: ☑️ agreed by YuJuncen.

Signed-off-by: Leavrth <[email protected]>
@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Mar 12, 2024
@Leavrth
Copy link
Contributor Author

Leavrth commented Mar 12, 2024

/ok-to-test

@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 Mar 26, 2024
ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Mar 26, 2024
@ti-chi-bot
Copy link
Member

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

ti-chi-bot bot pushed a commit that referenced this pull request Mar 29, 2024
@Leavrth Leavrth added 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. labels Apr 7, 2024
ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Apr 7, 2024
@ti-chi-bot
Copy link
Member

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

@ti-chi-bot
Copy link
Member

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

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Apr 7, 2024
ti-chi-bot bot pushed a commit that referenced this pull request Apr 17, 2024
ti-chi-bot bot pushed a commit that referenced this pull request May 22, 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. ok-to-test Indicates a PR is ready to be tested. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
4 participants