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: Add retry limit of connection err in fine grained backup #57713

Merged
merged 13 commits into from
Dec 6, 2024

Conversation

RidRisR
Copy link
Contributor

@RidRisR RidRisR commented Nov 26, 2024

What problem does this PR solve?

Issue Number: close #57449

Problem Summary:

The fine grained backup may fails into infinite retry when encounter disconnect err.

What changed and how does it work?

Add a retry limit of 3 to each store.

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.

Try to make error in resp 3 times, will get:

Error: failed to connect to store 1 for 3 times: failed to connect to store 1: [BR:Common:ErrFailedToConnect]failed to make gRPC channels

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 do-not-merge/invalid-title release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/cherry-pick-not-approved size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Nov 26, 2024
Copy link

tiprow bot commented Nov 26, 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 Retrylimit Add retry limit of connection err in fine grained backup Nov 26, 2024
@RidRisR RidRisR changed the title Add retry limit of connection err in fine grained backup br: Add retry limit of connection err in fine grained backup Nov 26, 2024
@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed do-not-merge/invalid-title size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Nov 26, 2024
@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Nov 26, 2024
Copy link

codecov bot commented Nov 26, 2024

Codecov Report

Attention: Patch coverage is 0% with 31 lines in your changes missing coverage. Please review.

Please upload report for BASE (release-8.1@4c32fcc). Learn more about missing BASE report.

Additional details and impacted files
@@               Coverage Diff                @@
##             release-8.1     #57713   +/-   ##
================================================
  Coverage               ?   71.2293%           
================================================
  Files                  ?       1467           
  Lines                  ?     423473           
  Branches               ?          0           
================================================
  Hits                   ?     301637           
  Misses                 ?     101357           
  Partials               ?      20479           
Flag Coverage Δ
unit 71.2293% <0.0000%> (?)

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

Components Coverage Δ
dumpling 52.9656% <0.0000%> (?)
parser ∅ <0.0000%> (?)
br 41.3050% <0.0000%> (?)

@purelind
Copy link
Contributor

/retest

Copy link

tiprow bot commented Nov 26, 2024

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

Copy link
Contributor

@Tristan1900 Tristan1900 left a comment

Choose a reason for hiding this comment

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

LGTM, do we need a test to verify it's working as expected?

br/pkg/backup/client.go Outdated Show resolved Hide resolved
br/pkg/backup/client.go Outdated Show resolved Hide resolved
@RidRisR
Copy link
Contributor Author

RidRisR commented Nov 27, 2024

LGTM, do we need a test to verify it's working as expected?

Unfortunately there is no handy infrastructure for testing fine grained, and it seems not so worthy to build one for a up to deprecate function.

I impl a basic manual test for it.

@RidRisR RidRisR requested a review from Tristan1900 November 27, 2024 03:00
@RidRisR
Copy link
Contributor Author

RidRisR commented Nov 27, 2024

/test unit-test

Copy link

tiprow bot commented Nov 29, 2024

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

@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Dec 4, 2024
@RidRisR
Copy link
Contributor Author

RidRisR commented Dec 4, 2024

/test check-dev2

Copy link

tiprow bot commented Dec 4, 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.

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

ti-chi-bot bot commented Dec 5, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-11-26 09:30:13.564085335 +0000 UTC m=+542401.183739846: ☑️ agreed by YuJuncen.
  • 2024-12-05 02:27:55.896761918 +0000 UTC m=+1294663.516416431: ☑️ agreed by Leavrth.

Copy link

ti-chi-bot bot commented Dec 5, 2024

[APPROVALNOTIFIER] This PR is APPROVED

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

@ti-chi-bot ti-chi-bot bot added cherry-pick-approved Cherry pick PR approved by release team. and removed do-not-merge/cherry-pick-not-approved labels Dec 5, 2024
@ti-chi-bot ti-chi-bot bot merged commit dcdf129 into pingcap:release-8.1 Dec 6, 2024
26 checks passed
@BornChanger BornChanger added the needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. label Dec 12, 2024
@ti-chi-bot
Copy link
Member

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

@BornChanger BornChanger added needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. labels Dec 17, 2024
@ti-chi-bot
Copy link
Member

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

@ti-chi-bot
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved cherry-pick-approved Cherry pick PR approved by release team. 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. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants