Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kvnemesis: expect LeaseTransferRejectedBecauseTargetMayNeedSnapshot e…
…rror Related to #87121. This commit adds the `LeaseTransferRejectedBecauseTargetMayNeedSnapshot` error status to the set of expected error types that can be returned to a `TransferLeaseOperation`. This commit, along with the previous, deflakes `TestKVNemesisMultiNode` when run with the following diff: ``` diff --git a/pkg/kv/kvserver/raftutil/util.go b/pkg/kv/kvserver/raftutil/util.go @@ -181,5 +183,8 @@ func ReplicaMayNeedSnapshot( // 2. that we do not perform a log truncation between now and when our action // goes into effect. In practice, this means serializing with Raft log // truncation operations using latching. + if rand.Intn(10) == 0 { + return ReplicaStateProbe + } return NoSnapshotNeeded } ```
- Loading branch information