Skip to content

[tx] add recover in tx.check#1160

Open
VihasMakwana wants to merge 5 commits intoetcd-io:mainfrom
VihasMakwana:panic-2
Open

[tx] add recover in tx.check#1160
VihasMakwana wants to merge 5 commits intoetcd-io:mainfrom
VihasMakwana:panic-2

Conversation

@VihasMakwana
Copy link
Contributor

tx.check is called in a goroutine inside tx.Check when using strict mode. tx.check performs checks on page flags and page id and it panics in the goroutine if type the database is corrupted. This panic, however, is not recovered and can cause the entire process to crash.
This PR adds recover call and passes the error to the caller.

Testing

I have added a unit test for this fix. This test would fail without the recover.

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

VihasMakwana and others added 4 commits March 7, 2026 02:32
Signed-off-by: VihasMakwana <121151420+VihasMakwana@users.noreply.github.com>
Signed-off-by: VihasMakwana <121151420+VihasMakwana@users.noreply.github.com>
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 6.2.0 to 6.3.0.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](actions/setup-go@7a3fe6c...4b73464)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-version: 6.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: VihasMakwana <121151420+VihasMakwana@users.noreply.github.com>
@VihasMakwana
Copy link
Contributor Author

/ok-to-test

@k8s-ci-robot
Copy link

@VihasMakwana: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

Details

In response to this:

/ok-to-test

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.

@Elbehery
Copy link
Member

Elbehery commented Mar 7, 2026

/ok-to-test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants