The RaftMaxInflightMsgs configuration param is also used on the receiver of Raft messages: Store.HandleRaftUncoalescedRequest will drop a message if the raftReceiveQueue for a range exceeds RaftMaxInflightMsgs+replicaQueueExtraSize (128 + 10).
In LazyReplication mode, the sender does not respect RaftMaxInflightMsgs. So it could send more entries and these will simply overflow the receiver queue, which is wasteful.
We should respect the RaftMaxInflightMsgs inside replicaSendStream when in lazy-replication/pull mode.
The
RaftMaxInflightMsgs
configuration param is also used on the receiver of Raft messages:Store.HandleRaftUncoalescedRequest
will drop a message if theraftReceiveQueue
for a range exceedsRaftMaxInflightMsgs+replicaQueueExtraSize
(128 + 10).In LazyReplication mode, the sender does not respect
RaftMaxInflightMsgs
. So it could send more entries and these will simply overflow the receiver queue, which is wasteful.We should respect the
RaftMaxInflightMsgs
insidereplicaSendStream
when in lazy-replication/pull mode.Jira issue: CRDB-44748