Closed pav-kv closed 1 year ago
@ahrtr FYI, this bug shouldn't affect etcd (I assume you don't yet use the MaxInflightBytes option).
@ahrtr FYI, this bug shouldn't affect etcd (I assume you don't yet use the MaxInflightBytes option).
No, etcd doesn't use it at all.
This change fixes a bug in the Inflights tracker. The reset() method did not zero the bytes counter, which could result in a quota "leak" and delayed or stalled MsgApp sends.
The reset() method is used when the replication flow changes state between Probe/Replicate/Snapshot. If reset() is not called at an appropriate moment, when Inflights.Full(), the bytes counter would stay over the budget and stall the flow.
The test added in this PR failed before, and passes after the change.