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

raftstore: continue GC snapshot files when it encounters a corrupted snapshot #10831

Merged
merged 1 commit into from Aug 31, 2021

Conversation

tonyxuqqi
Copy link
Contributor

@tonyxuqqi tonyxuqqi commented Aug 25, 2021

What problem does this PR solve?

Issue Number: close #10813

Problem Summary:

What is changed and how it works?

When snapshot GC runs into problem (such as file corrupted), today it stopped processing other GC-able snapshot files.
This PR will make it continue processing rest of the snapshot files.

Related changes

Tests

  • Unit test

Side effects
No.

Release note

RaftStore Snapshot GC fix: fix the issue that snapshot GC missed GC snapshot files when there's one snapshot file failed to be GC-ed. 

/cc @BusyJay

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Aug 25, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • BusyJay
  • hicqu

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.

…apshot.

add a fail_point on get_snapshot_for_gc

Signed-off-by: qi.xu <tonxuqi@outlook.com>
@hicqu
Copy link
Contributor

hicqu commented Aug 31, 2021

Rest LGTM.

@ti-chi-bot ti-chi-bot added the status/LGT1 Status: PR - There is already 1 approval label Aug 31, 2021
@ti-chi-bot ti-chi-bot added status/LGT2 Status: PR - There are already 2 approvals and removed status/LGT1 Status: PR - There is already 1 approval labels Aug 31, 2021
@BusyJay BusyJay added needs-cherry-pick-release-4.0 Type: Need cherry pick to release 4.0 needs-cherry-pick-release-5.0 Type: Need cherry pick to release 5.0 needs-cherry-pick-release-5.1 Type: Need cherry pick to release 5.1 needs-cherry-pick-release-5.2 Type: Need cherry pick to release-5.2 labels Aug 31, 2021
@hicqu
Copy link
Contributor

hicqu commented Aug 31, 2021

/merge

@ti-chi-bot
Copy link
Member

@hicqu: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

You only need to trigger /merge once, and if the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

If you have any questions about the PR merge process, please refer to pr process.

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
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: f8cc4f2

@ti-chi-bot ti-chi-bot added the status/can-merge Status: Can merge to base branch label Aug 31, 2021
@ti-chi-bot ti-chi-bot merged commit 56b3ae6 into tikv:master Aug 31, 2021
ti-srebot pushed a commit to ti-srebot/tikv that referenced this pull request Aug 31, 2021
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Contributor

cherry pick to release-4.0 in PR #10871

ti-srebot pushed a commit to ti-srebot/tikv that referenced this pull request Aug 31, 2021
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Contributor

cherry pick to release-5.0 in PR #10872

ti-srebot pushed a commit to ti-srebot/tikv that referenced this pull request Aug 31, 2021
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Contributor

cherry pick to release-5.1 in PR #10873

ti-srebot pushed a commit to ti-srebot/tikv that referenced this pull request Aug 31, 2021
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Contributor

cherry pick to release-5.2 in PR #10874

ti-chi-bot added a commit that referenced this pull request Sep 6, 2021
…snapshot (#10831) (#10871)

* cherry pick #10831 to release-4.0

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>

* backport the test case test_snapshot_gc_after_failed to 4.0

Signed-off-by: qi.xu <tonxuqi@outlook.com>

Co-authored-by: tonyxuqqi <tonyxuqi@outlook.com>
Co-authored-by: qi.xu <tonxuqi@outlook.com>
Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
ti-chi-bot added a commit that referenced this pull request Sep 6, 2021
…snapshot (#10831) (#10872)

* cherry pick #10831 to release-5.0

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>

* fix conflict

Signed-off-by: Jay Lee <BusyJayLee@gmail.com>

* remove extra case

Signed-off-by: Jay Lee <BusyJayLee@gmail.com>

* fix missing method

Signed-off-by: Jay Lee <BusyJayLee@gmail.com>

Co-authored-by: tonyxuqqi <tonyxuqi@outlook.com>
Co-authored-by: Jay Lee <BusyJayLee@gmail.com>
Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
daimashusheng pushed a commit to daimashusheng/tikv that referenced this pull request Sep 14, 2021
…snapshot (tikv#10831)

add a fail_point on get_snapshot_for_gc

Signed-off-by: qi.xu <tonxuqi@outlook.com>
Signed-off-by: tangjk <tangjiankun1226@gmail.com>
ti-chi-bot added a commit that referenced this pull request Sep 17, 2021
…snapshot (#10831) (#10873)

* cherry pick #10831 to release-5.1

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>

* resolve conflict in test_snap.rs

Signed-off-by: qi.xu <tonxuqi@outlook.com>

Co-authored-by: tonyxuqqi <tonyxuqi@outlook.com>
Co-authored-by: qi.xu <tonxuqi@outlook.com>
Co-authored-by: qupeng <qupeng@pingcap.com>
Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
ti-chi-bot pushed a commit that referenced this pull request Oct 18, 2021
…snapshot (#10831) (#10874)

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>

Co-authored-by: tonyxuqqi <tonyxuqi@outlook.com>
Co-authored-by: qupeng <qupeng@pingcap.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution Type: PR - From contributors first-time-contributor needs-cherry-pick-release-4.0 Type: Need cherry pick to release 4.0 needs-cherry-pick-release-5.0 Type: Need cherry pick to release 5.0 needs-cherry-pick-release-5.1 Type: Need cherry pick to release 5.1 needs-cherry-pick-release-5.2 Type: Need cherry pick to release-5.2 release-note size/L status/can-merge Status: Can merge to base branch status/LGT2 Status: PR - There are already 2 approvals
Projects
None yet
Development

Successfully merging this pull request may close these issues.

corrupted snapshot can prevent snapshot files gc
5 participants