Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kvserver: deflake TestRangefeedCheckpointsRecoverFromLeaseExpiration #129279

Merged
merged 1 commit into from
Aug 20, 2024

Conversation

iskettaneh
Copy link
Contributor

This commit does two things to deflake the test:

  1. Takes the MinExpiration into consideration when advancing the clock to cause the epoch lease to expire. This is important after the feature was enabled in: ba758c0
  2. Waits for N1's view of N2's lease expiration to match N2's view. This is important in the rare case where N1 tries to increase N2's epoch, but it has a stale view of the lease expiration time.

Fixes: #124178, #123551

Epic: None

Release note: None

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@iskettaneh iskettaneh force-pushed the RangeFeedTestDeflake branch from 5a8c82d to f06b73f Compare August 19, 2024 20:19
@iskettaneh iskettaneh self-assigned this Aug 20, 2024
@iskettaneh iskettaneh requested a review from arulajmani August 20, 2024 13:15
@iskettaneh iskettaneh marked this pull request as ready for review August 20, 2024 13:15
@iskettaneh iskettaneh requested a review from a team as a code owner August 20, 2024 13:15
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:

Great job getting to the bottom of this!

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @iskettaneh)


pkg/kv/kvserver/replica_rangefeed_test.go line 1673 at r1 (raw file):

	// Ask another node to increment n2's liveness record, but first, wait until
	// both nodes view on the liveness expiration converge.

nit: This deserves more explanation. Consider rewording to something like:

"but first, wait until n1's liveness state is the same as n2's. Otherwise, the epoch below might get rejected because of mismatching liveness records".

This commit does two things to deflake the test:

1) Takes the MinExpiration into consideration when advancing the clock
to cause the epoch lease to expire. This is important after the feature
was enabled in: ba758c0

2) Waits for N1's view of N2's lease expiration to match N2's view.
This is important in the rare case where N1 tries to increase N2's
epoch, but it has a stale view of the lease expiration time.

Fixes: cockroachdb#124178, cockroachdb#123551

Epic: None

Release note: None
@iskettaneh iskettaneh force-pushed the RangeFeedTestDeflake branch from f06b73f to f985c4f Compare August 20, 2024 16:16
@iskettaneh
Copy link
Contributor Author

bors r+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kv/kvserver: TestRangefeedCheckpointsRecoverFromLeaseExpiration failed
3 participants