tidb-operator icon indicating copy to clipboard operation
tidb-operator copied to clipboard

Control backup gc by completed and failed bakcups number

Open just1900 opened this issue 3 years ago • 6 comments

Signed-off-by: just1900 [email protected]

What problem does this PR solve?

fix #3660

What is changed and how does it work?

adding MaxCompletedBackups and MaxFailedBackups fields to control backup gc.

Code changes

  • [x] Has Go code change
  • [ ] Has CI related scripts change

Tests

  • [ ] Unit test
  • [ ] E2E test
  • [ ] Manual test
  • [ ] No code

Side effects

  • [ ] Breaking backward compatibility
  • [ ] Other side effects:

Related changes

  • [ ] Need to cherry-pick to the release branch
  • [ ] Need to update the documentation

Release Notes

Please refer to Release Notes Language Style Guide before writing the release note.

control backup gc by completed and failed bakcups number

just1900 avatar Mar 17 '22 02:03 just1900

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • KanShiori
  • csuzhangxc

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment. After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review. Reviewer can cancel approval by submitting a request changes review.

ti-chi-bot avatar Mar 17 '22 02:03 ti-chi-bot

Codecov Report

Merging #4480 (8a025a8) into master (0d13639) will increase coverage by 9.56%. The diff coverage is 69.69%.

@@            Coverage Diff             @@
##           master    #4480      +/-   ##
==========================================
+ Coverage   62.79%   72.35%   +9.56%     
==========================================
  Files         184      188       +4     
  Lines       19875    22310    +2435     
==========================================
+ Hits        12480    16142    +3662     
+ Misses       6262     5043    -1219     
+ Partials     1133     1125       -8     
Flag Coverage Δ
e2e 60.09% <0.00%> (?)
unittest 62.80% <71.87%> (+0.01%) :arrow_up:

codecov-commenter avatar Mar 17 '22 04:03 codecov-commenter

seems like a issue exists when backupGCByPolicy and backupGCByMaxBackups concurrently delete backups.

just1900 avatar Mar 23 '22 03:03 just1900

/test pull-e2e-kind-serial

just1900 avatar Mar 30 '22 03:03 just1900

/test pull-e2e-kind pull-e2e-kind-br pull-e2e-kind-tngm

KanShiori avatar Apr 12 '22 02:04 KanShiori

@just1900: PR needs rebase.

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.

ti-chi-bot avatar May 11 '22 22:05 ti-chi-bot