Skip to content

Commit

Permalink
kvserver: de-flake TestRangefeedCheckpointsRecoverFromLeaseExpiration
Browse files Browse the repository at this point in the history
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
  • Loading branch information
irfansharif committed Jan 26, 2022
1 parent f918e4b commit 071ecc5
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 @@ -1045,7 +1045,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 071ecc5

Please sign in to comment.