bneradt commented on code in PR #13780:
URL: https://github.com/apache/trafficserver/pull/13780#discussion_r4161424211
##########
src/proxy/http2/Http2Stream.cc:
##########
@@ -951,6 +951,25 @@ Http2Stream::signal_read_event(int event)
terminate_if_possible();
}
+/** Signal the event that ends the read side, or hold it until reenable() if
the consumer has the read VIO disabled.
+
+ A consumer that throttles its producer disables the read VIO. The END_STREAM
that arrives during that
+ window is the only end-of-read signal the stream will see, so it must not be
dropped.
+ */
+void
+Http2Stream::signal_final_read_event(int event)
+{
+ if (this->_is_read_gated()) {
+ return;
+ }
+ if (this->read_vio.is_disabled()) {
+ Http2StreamDebug("defer %s until the read VIO is re-enabled",
get_vc_event_name(event));
+ this->_deferred_read_event = event;
+ return;
+ }
+ this->signal_read_event(event);
Review Comment:
Good catch, fixed in the force-pushed commit. When `main_event_handler`
retries a `_read_vio_event` after a mutex miss, it now sends READ_COMPLETE and
EOS back through `signal_final_read_event()` instead of `signal_read_event()`.
If the tunnel disabled the VIO in the meantime, the event is deferred and
redelivered on `reenable()` instead of being dropped. READ_READY retries still
take the generic path.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]