Skip to content

Conversation

@tbg
Copy link
Member

@tbg tbg commented Jan 7, 2026

Backport 1/1 commits from #159882 on behalf of @tbg.


The test had a race condition between lease transfer verification and
partition activation. After transferring the lease from n1 to n3, there
was a window where n1 could re-acquire the lease before the partition
was activated, causing the subsequent increment to hang waiting for a
slow proposal on the now-partitioned n1.

I spent a couple of hours trying to deflake this, but whenever you fix
one thing, another springs up. This test is not maintainable, and is
highly complex.

The split_pre_apply tests cover this functionality. Testing it from "far
away" does give some extra coverage, but at a steep price for maintainability,
which we are not ready to pay, so the test is removed in this commit.

Fixes (on 26.1) #159676
Fixes #158295.


Release justification: flake fix

The test had a race condition between lease transfer verification and
partition activation. After transferring the lease from n1 to n3, there
was a window where n1 could re-acquire the lease before the partition
was activated, causing the subsequent increment to hang waiting for a
slow proposal on the now-partitioned n1.

I spent a couple of hours trying to deflake this, but whenever you fix
one thing, another springs up. This test is not maintainable, and is
highly complex.

The [split_pre_apply] tests cover this functionality. Testing it from "far
away" does give some extra coverage, but at a steep price for maintainability,
which we are not ready to pay, so the test is removed in this commit.

[split_pre_apply]: https://github.com/tbg/cockroach/blob/7270a51a0430999661ed15320527ccc04d796a14/pkg/kv/kvserver/testdata/replica_lifecycle/split_pre_apply.txt

Fixes (on 26.1) cockroachdb#159676
Fixes cockroachdb#158295.
@tbg tbg force-pushed the blathers/backport-release-26.1-159882 branch from 50312d5 to 331812e Compare January 7, 2026 17:40
@tbg tbg requested a review from a team as a code owner January 7, 2026 17:40
@blathers-crl blathers-crl bot added blathers-backport This is a backport that Blathers created automatically. O-robot Originated from a bot. labels Jan 7, 2026
@blathers-crl blathers-crl bot requested a review from arulajmani January 7, 2026 17:40
@blathers-crl
Copy link

blathers-crl bot commented Jan 7, 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 Jan 7, 2026
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@blathers-crl blathers-crl bot added the backport-test-only Used to denote the backport has only non-production changes label Jan 7, 2026
@tbg tbg merged commit a027b2a into cockroachdb:release-26.1 Jan 8, 2026
17 checks passed
@tbg tbg deleted the blathers/backport-release-26.1-159882 branch January 8, 2026 12:38
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 backport-test-only Used to denote the backport has only non-production changes blathers-backport This is a backport that Blathers created automatically. O-robot Originated from a bot. T-kv KV Team target-release-26.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants