zilla icon indicating copy to clipboard operation
zilla copied to clipboard

Fix potential bug in active streams metric count

Open jfallows opened this issue 10 months ago • 0 comments

In half-duplex streams such as http, when the response stream can be deferred until even after the request stream has ended, we may need to cancel the response stream before it begins, by sending a RESET frame.

However, the metrics for active streams count this as a -1 for the response stream, even though it has not been offset by a corresponding +1 for the response BEGIN.

To resolve, this we need to understand the state of the stream, i.e. that the BEGIN was never sent.

This can be done by retaining per-stream state in the metrics counter for active streams, but better to expose the state of the stream in the frames sent by the bindings, so the metrics can be stateless.

jfallows avatar Apr 17 '24 06:04 jfallows