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

Closed michaelmdeng closed 3 months ago

michaelmdeng commented 3 months ago

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.

sre-bot commented 3 months ago

CLA assistant check
All committers have signed the CLA.

BornChanger commented 3 months ago

/cc @YuJuncen

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

@YuJuncen: adding LGTM is restricted to approvers and reviewers in OWNERS files.

In response to [this](https://github.com/pingcap/tidb-operator/pull/5596#pullrequestreview-1973391595): >LGTM, thanks! Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
ti-chi-bot[bot] commented 3 months ago

@YuJuncen: adding LGTM is restricted to approvers and reviewers in OWNERS files.

In response to [this](https://github.com/pingcap/tidb-operator/pull/5596#pullrequestreview-1975480694): > Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
ti-chi-bot[bot] commented 3 months ago

@michaelmdeng: Your PR was out of date, I have automatically updated it for you.

Instructions for interacting with me using PR comments are available [here](https://prow.tidb.net/command-help). If you have questions or suggestions related to my behavior, please file an issue against the [ti-community-infra/tichi](https://github.com/ti-community-infra/tichi/issues/new?title=Prow%20issue:) repository.
codecov-commenter commented 3 months ago

Codecov Report

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

Project coverage is 67.74%. Comparing base (685a06d) to head (f813e45).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #5596 +/- ## ========================================== + Coverage 61.49% 67.74% +6.25% ========================================== Files 235 246 +11 Lines 30337 34230 +3893 ========================================== + Hits 18655 23189 +4534 + Misses 9813 9138 -675 - Partials 1869 1903 +34 ``` | [Flag](https://app.codecov.io/gh/pingcap/tidb-operator/pull/5596/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | Coverage Δ | | |---|---|---| | [e2e](https://app.codecov.io/gh/pingcap/tidb-operator/pull/5596/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `48.05% <ø> (?)` | | | [unittest](https://app.codecov.io/gh/pingcap/tidb-operator/pull/5596/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `61.47% <ø> (-0.02%)` | :arrow_down: |
BornChanger commented 3 months ago

/retest

BornChanger commented 3 months ago

/merge

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

@BornChanger: We have migrated to builtin LGTM and approve plugins for reviewing.

Please use /approve when you want approve this pull request.

The changes announcement: LGTM plugin changes

Instructions for interacting with me using PR comments are available [here](https://prow.tidb.net/command-help). If you have questions or suggestions related to my behavior, please file an issue against the [ti-community-infra/tichi](https://github.com/ti-community-infra/tichi/issues/new?title=Prow%20issue:) repository.
BornChanger commented 3 months ago

/cherry-pick release-1.5

ti-chi-bot commented 3 months ago

@BornChanger: once the present PR merges, I will cherry-pick it on top of release-1.5 in the new PR and assign it to you.

In response to [this](https://github.com/pingcap/tidb-operator/pull/5596#issuecomment-2033829250): >/cherry-pick release-1.5 Instructions for interacting with me using PR comments are available [here](https://prow.tidb.net/command-help). If you have questions or suggestions related to my behavior, please file an issue against the [ti-community-infra/tichi](https://github.com/ti-community-infra/tichi/issues/new?title=Prow%20issue:) repository.
BornChanger commented 3 months ago

/approve

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

[LGTM Timeline notifier]

Timeline:

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: BornChanger, csuzhangxc, WangLe1321, YuJuncen

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](https://github.com/pingcap/tidb-operator/blob/master/OWNERS)~~ [BornChanger,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 commented 3 months ago

@BornChanger: new pull request created to branch release-1.5: #5605.

In response to [this](https://github.com/pingcap/tidb-operator/pull/5596#issuecomment-2033829250): >/cherry-pick release-1.5 Instructions for interacting with me using PR comments are available [here](https://prow.tidb.net/command-help). If you have questions or suggestions related to my behavior, please file an issue against the [ti-community-infra/tichi](https://github.com/ti-community-infra/tichi/issues/new?title=Prow%20issue:) repository.