pingcap / tidb-operator

TiDB operator creates and manages TiDB clusters running in Kubernetes.
https://docs.pingcap.com/tidb-in-kubernetes/
Apache License 2.0
1.2k stars 490 forks source link

Skip corruption check on last WAL (#5596) #5605

Closed ti-chi-bot closed 3 months ago

ti-chi-bot commented 3 months ago

This is an automated cherry-pick of #5596

What problem does this PR solve?

During EBS snapshot warmup, only check WALs up to the last one for corruption. We expect some corruptions in the last WAL due to race between fsync and EBS snapshot, and we can recover from these scenarios.

Also updates WAL log file pattern since logs can contain variable length log nos.

What is changed and how does it work?

Code changes

Tests

Executed warmup w/ these changes and observe warmup progress normally w/out checking the last WAL

Side effects

Related changes

Release Notes

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

ti-chi-bot[bot] commented 3 months ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please assign linuxgit for approval. For more information see the Code Review Process.

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

Needs approval from an approver in each of these files: - **[OWNERS](https://github.com/pingcap/tidb-operator/blob/release-1.5/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
codecov-commenter commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 61.54%. Comparing base (438a1ed) to head (89358e6). Report is 1 commits behind head on release-1.5.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## release-1.5 #5605 +/- ## =============================================== - Coverage 61.56% 61.54% -0.02% =============================================== Files 229 229 Lines 29330 29331 +1 =============================================== - Hits 18056 18051 -5 - Misses 9495 9498 +3 - Partials 1779 1782 +3 ``` | [Flag](https://app.codecov.io/gh/pingcap/tidb-operator/pull/5605/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | Coverage Δ | | |---|---|---| | [unittest](https://app.codecov.io/gh/pingcap/tidb-operator/pull/5605/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `61.54% <ø> (-0.02%)` | :arrow_down: |