Skip to content

Conversation

@tbg
Copy link
Member

@tbg tbg commented Dec 19, 2025

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.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@tbg tbg force-pushed the deflake-TestProcessSplitAfterRightHandSideHasBeenRemoved branch from 6a5bfdc to 7270a51 Compare December 19, 2025 13:22
@tbg tbg force-pushed the deflake-TestProcessSplitAfterRightHandSideHasBeenRemoved branch from 7270a51 to 33b2af9 Compare January 6, 2026 11:13
@tbg tbg changed the title kvserver: deflake TestProcessSplitAfterRightHandSideHasBeenRemoved kvserver: remove TestProcessSplitAfterRightHandSideHasBeenRemoved Jan 6, 2026
@tbg tbg added the backport-26.1.x Flags PRs that need to be backported to 26.1 label Jan 6, 2026
@tbg tbg requested a review from arulajmani January 6, 2026 11:14
@tbg tbg marked this pull request as ready for review January 6, 2026 11:14
@tbg tbg requested a review from a team as a code owner January 6, 2026 11:14
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 deflake-TestProcessSplitAfterRightHandSideHasBeenRemoved branch from 33b2af9 to e8f5a3f Compare January 7, 2026 10:50
Copy link
Collaborator

@arulajmani arulajmani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

bors r+

@arulajmani reviewed 1 file and all commit messages, and made 2 comments.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @tbg).


-- commits line 14 at r1:
This makes me smile!

@craig craig bot merged commit 7b9a1c7 into cockroachdb:master Jan 7, 2026
26 checks passed
@craig
Copy link
Contributor

craig bot commented Jan 7, 2026

@blathers-crl
Copy link

blathers-crl bot commented Jan 7, 2026

Based on the specified backports for this PR, I applied new labels to the following linked issue(s). Please adjust the labels as needed to match the branches actually affected by the issue(s), including adding any known older branches.


Issue #158295: branch-release-26.1.


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

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

Labels

backport-26.1.x Flags PRs that need to be backported to 26.1 target-release-26.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

kv/kvserver: TestProcessSplitAfterRightHandSideHasBeenRemoved failed

3 participants