Skip to content

Commit

Permalink
Merge #75587
Browse files Browse the repository at this point in the history
75587: kvserver: de-flake TestRangefeedCheckpointsRecoverFromLeaseExpiration r=irfansharif a=irfansharif

Fixes #75098.

We didn't account for a possibly stale distsender cache earlier,
misrouting the LeaseInfo request to the last known leaseholder. By
providing a hint with the new leaseholder, we were also making an
assertion on cache freshness. We skip the hint and do just what the test
wants -- ensuring a lease renewal. Repro-ed within seconds before this
commit:

    dev test pkg/kv/kvserver \
      -f TestRangefeedCheckpointsRecoverFromLeaseExpiration --stress

Release note: None

Co-authored-by: irfan sharif <[email protected]>
  • Loading branch information
craig[bot] and irfansharif committed Jan 27, 2022
2 parents ba5c832 + 071ecc5 commit fa93c68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/kv/kvserver/replica_rangefeed_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1269,7 +1269,7 @@ func TestRangefeedCheckpointsRecoverFromLeaseExpiration(t *testing.T) {
require.Equal(t, int64(1), nudged)

// Check that n2 renewed its lease, like the test intended.
li, _, err := tc.FindRangeLeaseEx(ctx, desc, &n2Target)
li, _, err := tc.FindRangeLeaseEx(ctx, desc, nil)
require.NoError(t, err)
require.True(t, li.Current().OwnedBy(n2.GetFirstStoreID()))
require.Equal(t, int64(2), li.Current().Epoch)
Expand Down

0 comments on commit fa93c68

Please sign in to comment.