tidb-operator
tidb-operator copied to clipboard
set `gc.ratio-threshold` to `-1` when performing pitr restore
… and tests
What problem does this PR solve?
The gc.ratio-threshold may not be persisted and might cause data loss after the restoration when a TiKV restart during PiTR.
This PR will make operator set the gc.ratio-threshold to config map when encountering a pitr restore task.
Code changes
- [x] Has Go code change
- [ ] Has CI related scripts change
Tests
- [x] 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.
Now, `gc.ratio-threshold` will be persisted during restoring.
Codecov Report
Attention: Patch coverage is 65.58140% with 74 lines in your changes missing coverage. Please review.
Project coverage is 63.47%. Comparing base (
a16b2e8) to head (00ecb57). Report is 47 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #6267 +/- ##
==========================================
+ Coverage 57.19% 63.47% +6.27%
==========================================
Files 259 263 +4
Lines 33233 46535 +13302
==========================================
+ Hits 19008 29537 +10529
- Misses 12291 14920 +2629
- Partials 1934 2078 +144
| Flag | Coverage Δ | |
|---|---|---|
| e2e | 47.61% <60.00%> (?) |
|
| unittest | 56.53% <64.18%> (-0.66%) |
:arrow_down: |
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
@BornChanger: You cannot manually add or delete the cherry pick branch category labels. It will be added automatically by bot when the PR is created.
In response to adding label named type/cherry-pick-for-release-1.6.
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.
@BornChanger: You cannot manually add or delete the cherry pick branch category labels. It will be added automatically by bot when the PR is created.
In response to adding label named type/cherry-pick-for-feature/v2.
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.
@BornChanger: You cannot manually add or delete the cherry pick branch category labels. It will be added automatically by bot when the PR is created.
In response to adding label named type/cherry-pick-for-release-1.5.
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.
/run-pull-e2e-kind-br
@3pointer: adding LGTM is restricted to approvers and reviewers in OWNERS files.
In response to this:
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.
/run-pull-e2e-kind-br
/run-pull-e2e-kind-br
@liubog2008: You cannot manually add or delete the reviewing state labels, only I and the tursted members have permission to do so.
In response to removing label named lgtm.
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.
/lgtm cancel
/run-pull-e2e-kind-br
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: 3pointer, csuzhangxc, WangLe1321
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [WangLe1321,csuzhangxc]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
[LGTM Timeline notifier]
Timeline:
2025-07-01 02:24:47.270181265 +0000 UTC m=+1361739.993360244: :ballot_box_with_check: agreed by WangLe1321.2025-07-01 02:26:29.641399637 +0000 UTC m=+1361842.364578618: :heavy_multiplication_x::repeat: reset by YuJuncen.2025-07-01 02:40:28.094090443 +0000 UTC m=+1362680.817269424: :heavy_multiplication_x::repeat: reset by liubog2008.2025-07-03 11:55:09.986208167 +0000 UTC m=+1568762.709387148: :ballot_box_with_check: agreed by liubog2008.2025-07-03 11:56:25.548051239 +0000 UTC m=+1568838.271230221: :heavy_multiplication_x::repeat: reset by liubog2008.2025-07-04 14:21:26.251559215 +0000 UTC m=+1663938.974738198: :ballot_box_with_check: agreed by csuzhangxc.
/run-all-tests
/cherry-pick release-1.6
@csuzhangxc: once the present PR merges, I will cherry-pick it on top of release-1.6 in the new PR and assign it to you.
In response to this:
/cherry-pick release-1.6
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.
/run-pull-e2e-kind-br
/run-pull-e2e-kind
/run-pull-e2e-kind-across-kubernetes
/run-pull-e2e-kind-basic
/run-pull-e2e-kind-across-kubernetes
/run-pull-e2e-kind-across-kubernetes
/run-pull-e2e-kind-across-kubernetes
/run-pull-e2e-kind-across-kubernetes
@csuzhangxc: new pull request created to branch release-1.6: #6283.
In response to this:
/cherry-pick release-1.6
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.
/cherry-pick release-1.5
@Leavrth: new pull request created to branch release-1.5: #6324.
In response to this:
/cherry-pick release-1.5
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.