Skip to content

release-26.2: kvserver: stop wrapping AbortSpan errors as ReplicaCorruptionError#168014

Merged
trunk-io[bot] merged 2 commits into
cockroachdb:release-26.2from
tbg:backport26.2-167295
Apr 10, 2026
Merged

release-26.2: kvserver: stop wrapping AbortSpan errors as ReplicaCorruptionError#168014
trunk-io[bot] merged 2 commits into
cockroachdb:release-26.2from
tbg:backport26.2-167295

Conversation

@tbg
Copy link
Copy Markdown
Member

@tbg tbg commented Apr 9, 2026

Backport 1/2 commits from #167295.

/cc @cockroachdb/release


AbortSpan read errors were wrapped as ReplicaCorruptionError, causing the
node to fatal via setCorruptRaftMuLocked. This was overly aggressive: a
failure to read from the AbortSpan is not indicative of replica corruption.
Transient I/O errors would crash the node instead of being returned to the
caller.

This is the last remaining production call site that produces
ReplicaCorruptionError (the split/merge trigger wrapping was removed in
#167289).

Informs: #165558
Epic: none

Release justification: Low-risk bug fix. One-line change that stops wrapping
a non-corruption error as ReplicaCorruptionError, preventing unnecessary
node crashes on transient I/O errors during AbortSpan reads.

This is the last remaining production call site that wraps errors as
`ReplicaCorruptionError`. A failure to read from the AbortSpan is not
indicative of replica corruption and should not crash the node.

This is a minimal fix suitable for backporting. A follow-up commit
removes the now-dead `ReplicaCorruptionError` infrastructure entirely.

Informs: cockroachdb#165558
Release note (bug fix): Fixed a bug where transient I/O errors reading
from the AbortSpan were misidentified as replica corruption, causing
the node to crash. These errors are now returned to the caller as
regular errors.
Epic: none

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@trunk-io
Copy link
Copy Markdown
Contributor

trunk-io Bot commented Apr 9, 2026

😎 Merged successfully - details.

@blathers-crl
Copy link
Copy Markdown

blathers-crl Bot commented Apr 9, 2026

Thanks for opening a backport.

Before merging, please confirm that the change does not break backwards compatibility and otherwise complies with the backport policy. Include a brief release justification in the PR description explaining why the backport is appropriate. All backports must be reviewed by the TL for the owning area. While the stricter LTS policy does not yet apply, please exercise judgment and consider gating non-critical changes behind a disabled-by-default feature flag when appropriate.

@blathers-crl blathers-crl Bot added backport Label PR's that are backports to older release branches T-kv KV Team labels Apr 9, 2026
@blathers-crl
Copy link
Copy Markdown

blathers-crl Bot commented Apr 9, 2026

It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@tbg tbg changed the title release-26.2: kvserver: remove ReplicaCorruptionError release-26.2: kvserver: stop wrapping AbortSpan errors as ReplicaCorruptionError Apr 9, 2026
@tbg tbg marked this pull request as ready for review April 9, 2026 11:33
@tbg tbg requested a review from a team as a code owner April 9, 2026 11:33
…rapping

The backport of the AbortSpan error change from cockroachdb#167295 carried the
production code fix but missed the corresponding test update. The test
still asserted that the error contained "replica corruption" and that
the node fataled, but these behaviors were removed by the backported
change.

Update the test to match: expect "could not read from AbortSpan" instead
of "replica corruption", and remove the fatal exit assertion.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@tbg tbg requested a review from arulajmani April 9, 2026 12:30
@trunk-io trunk-io Bot merged commit f6a4455 into cockroachdb:release-26.2 Apr 10, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Label PR's that are backports to older release branches T-kv KV Team target-release-26.2.1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants