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

set `gc.ratio-threshold` to `-1` when performing pitr restore

Open YuJuncen opened this issue 5 months ago • 2 comments

… 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.

YuJuncen avatar Jun 24 '25 10:06 YuJuncen

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.

codecov-commenter avatar Jun 25 '25 03:06 codecov-commenter

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

ti-chi-bot[bot] avatar Jun 25 '25 09:06 ti-chi-bot[bot]

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

ti-chi-bot[bot] avatar Jun 25 '25 09:06 ti-chi-bot[bot]

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

ti-chi-bot[bot] avatar Jun 25 '25 09:06 ti-chi-bot[bot]

/run-pull-e2e-kind-br

BornChanger avatar Jun 30 '25 08:06 BornChanger

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

ti-chi-bot[bot] avatar Jun 30 '25 08:06 ti-chi-bot[bot]

/run-pull-e2e-kind-br

BornChanger avatar Jun 30 '25 15:06 BornChanger

/run-pull-e2e-kind-br

BornChanger avatar Jun 30 '25 22:06 BornChanger

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

ti-chi-bot[bot] avatar Jul 03 '25 11:07 ti-chi-bot[bot]

/lgtm cancel

liubog2008 avatar Jul 03 '25 11:07 liubog2008

/run-pull-e2e-kind-br

BornChanger avatar Jul 03 '25 11:07 BornChanger

[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

Needs approval from an approver in each of these files:
  • ~~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

ti-chi-bot[bot] avatar Jul 04 '25 14:07 ti-chi-bot[bot]

[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.

ti-chi-bot[bot] avatar Jul 04 '25 14:07 ti-chi-bot[bot]

/run-all-tests

csuzhangxc avatar Jul 04 '25 14:07 csuzhangxc

/cherry-pick release-1.6

csuzhangxc avatar Jul 04 '25 14:07 csuzhangxc

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

ti-chi-bot avatar Jul 04 '25 14:07 ti-chi-bot

/run-pull-e2e-kind-br

BornChanger avatar Jul 04 '25 16:07 BornChanger

/run-pull-e2e-kind

csuzhangxc avatar Jul 05 '25 00:07 csuzhangxc

/run-pull-e2e-kind-across-kubernetes

csuzhangxc avatar Jul 05 '25 00:07 csuzhangxc

/run-pull-e2e-kind-basic

csuzhangxc avatar Jul 05 '25 00:07 csuzhangxc

/run-pull-e2e-kind-across-kubernetes

csuzhangxc avatar Jul 05 '25 01:07 csuzhangxc

/run-pull-e2e-kind-across-kubernetes

BornChanger avatar Jul 05 '25 03:07 BornChanger

/run-pull-e2e-kind-across-kubernetes

BornChanger avatar Jul 05 '25 04:07 BornChanger

/run-pull-e2e-kind-across-kubernetes

csuzhangxc avatar Jul 06 '25 04:07 csuzhangxc

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

ti-chi-bot avatar Jul 06 '25 05:07 ti-chi-bot

/cherry-pick release-1.5

Leavrth avatar Jul 25 '25 01:07 Leavrth

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

ti-chi-bot avatar Jul 25 '25 01:07 ti-chi-bot