Skip to content

kvserver: de-flake TestStrictGCEnforcement#73153

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
tbg:TestStrictGCEnforcement
Nov 26, 2021
Merged

kvserver: de-flake TestStrictGCEnforcement#73153
craig[bot] merged 1 commit intocockroachdb:masterfrom
tbg:TestStrictGCEnforcement

Conversation

@tbg
Copy link
Copy Markdown
Member

@tbg tbg commented Nov 25, 2021

PR #72978 unintentionally introduced a small change: on a follower read,
we would pass the lease status to checkTSAboveGCThreshold. If this
lease status was VALID but not owned by the recipient replica (i.e.
this was a follower read), checkTSAboveGCThreshold could return the
implied GCThreshold (i.e. now()-gcttl) instead of the lowest possible
TTL. This made TestStrictGCEnforcement flaky since that test verifies
that a historical read goes through on the recent recipient of a lease
(which may not have applied the lease yet), who would serve it via a
follower read and would thus error out a read that the test expected to
go through.

Fixes #73123.

Release note: None

@tbg tbg requested a review from a team as a code owner November 25, 2021 10:32
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@tbg
Copy link
Copy Markdown
Member Author

tbg commented Nov 25, 2021

bors r=erikgrinaker

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Nov 25, 2021

Merge conflict.

PR cockroachdb#72978 unintentionally introduced a small change: on a follower read,
we would pass the lease status to `checkTSAboveGCThreshold`. If this
lease status was `VALID` but not owned by the recipient replica (i.e.
this was a follower read), `checkTSAboveGCThreshold` could return the
implied GCThreshold (i.e. `now()-gcttl`) instead of the lowest possible
TTL. This made `TestStrictGCEnforcement` flaky since that test verifies
that a historical read goes through on the recent recipient of a lease
(which may not have applied the lease yet), who would serve it via a
follower read and would thus error out a read that the test expected to
go through.

Fixes cockroachdb#73123.

Release note: None
@tbg tbg force-pushed the TestStrictGCEnforcement branch from f1aab07 to 23a8229 Compare November 26, 2021 09:12
@tbg
Copy link
Copy Markdown
Member Author

tbg commented Nov 26, 2021

bors r=erikgrinaker

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Nov 26, 2021

Build succeeded:

@craig craig bot merged commit 7886ce2 into cockroachdb:master Nov 26, 2021
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: TestStrictGCEnforcement failed

3 participants