-
Notifications
You must be signed in to change notification settings - Fork 216
tracker: fix byte counter leak in Inflights tracker #54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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. Signed-off-by: Pavel Kalinnikov <[email protected]>
tbg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good find!
|
@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. |
ahrtr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch.
thx
…-bytes-leak tracker: fix byte counter leak in Inflights tracker 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. Signed-off-by: Pavel Kalinnikov <[email protected]>
This commit cherry-picks a bug fix for Inflights type into the 23.1 release. The fix is cherry-picked onto a branch parallel to the 23.1 release, in our fork of etcd-io/raft. Release justification: a bug fix in range availability Epic: none Release note: none
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.