Skip to content

Commit

Permalink
kvserverpb: mark probe requests' replicated cmds as IsTrivial
Browse files Browse the repository at this point in the history
That way, they won't each request their own `replicaAppBatch`. They were wildly
inefficient to apply before this commit, which played a role in a recent
incident[^1].

[^1]: cockroachlabs/support#2287

Epic: none
Release note: None
  • Loading branch information
tbg committed Jun 2, 2023
1 parent eb5f63d commit f207e49
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/kv/kvserver/kvserverpb/proposer_kv.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ func (r *ReplicatedEvalResult) IsTrivial() bool {
allowlist.Delta = enginepb.MVCCStatsDelta{}
allowlist.WriteTimestamp = hlc.Timestamp{}
allowlist.PrevLeaseProposal = nil
allowlist.IsProbe = false // probes are trivial, they always get refused in CheckForcedErr
allowlist.State = nil
return allowlist.IsZero()
}

0 comments on commit f207e49

Please sign in to comment.