Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions doc/admin-guide/files/records.yaml.en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,9 @@ Network

See :ref:`admin-performance-timeouts` for more discussion on |TS| timeouts.

Note that for QUIC this will be ignored and ``proxy.config.quic.no_activity_timeout_in``
should be used instead.

.. ts:cv:: CONFIG proxy.config.net.inactivity_check_frequency INT 1

How frequent (in seconds) to check for inactive connections. If you deal
Expand Down Expand Up @@ -4493,6 +4496,11 @@ removed in the future without prior notice.
This value will be advertised as ``idle_timeout`` Transport Parameter.
Transport Parameter.

.. important::

QUIC ignores any settings for ``proxy.config.net.default_inactivity_timeout`` and only
honors the ``proxy.config.quic.no_activity_timeout_in``.

.. ts:cv:: CONFIG proxy.config.quic.no_activity_timeout_out INT 30000
:reloadable:

Expand Down
15 changes: 9 additions & 6 deletions iocore/net/QUICNetVConnection_quiche.cc
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ QUICNetVConnection::free()
void
QUICNetVConnection::remove_connection_ids()
{
if (this->_ctable) {
this->_ctable->erase(this->_quic_connection_id, this);
this->_ctable->erase(this->_original_quic_connection_id, this);
}
}

// called by ET_UDP
Expand Down Expand Up @@ -281,12 +285,14 @@ QUICNetVConnection::acceptEvent(int event, Event *e)
SET_HANDLER((NetVConnHandler)&QUICNetVConnection::state_handshake);

// Send this netvc to InactivityCop.
// Note: even though we will set the timeouts to 0, we need this so we make sure the one gets freed and the IO is properly ended.
nh->startCop(this);

// We will take care of this by using `idle_timeout` configured by `proxy.config.quic.no_activity_timeout_in`.
this->set_default_inactivity_timeout(0);

if (inactivity_timeout_in) {
set_inactivity_timeout(inactivity_timeout_in);
} else {
set_inactivity_timeout(0);
this->set_inactivity_timeout(inactivity_timeout_in);
}

if (active_timeout_in) {
Expand Down Expand Up @@ -589,9 +595,6 @@ QUICNetVConnection::_handle_interval()
quiche_conn_on_timeout(this->_quiche_con);

if (quiche_conn_is_closed(this->_quiche_con)) {
this->_ctable->erase(this->_quic_connection_id, this);
this->_ctable->erase(this->_original_quic_connection_id, this);

if (quiche_conn_is_timed_out(this->_quiche_con)) {
QUICConDebug("QUIC Idle timeout detected");
this->thread->schedule_imm(this, VC_EVENT_INACTIVITY_TIMEOUT);
Expand Down
20 changes: 8 additions & 12 deletions tests/gold_tests/timeout/quic_no_activity_timeout.test.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,11 @@ def run(self, check_for_max_idle_timeout=False):
gold_file="gold/quic_no_activity_timeout.gold")
test1.run(check_for_max_idle_timeout=True)

##
# The following tests is commented out as if we have a smaller default_inactivity_timeout
# happening before the configured max_idle_timeout in quiche we will end up crashing.
# The following should be uncommented once the bug is fixed.
#

# test2 = Test_quic_no_activity_timeout(
# "Test quic ts.quic.no_activity_timeout_in(max_idle_timeout_, default_inactivity_timeout should kick in first.",
# replay_keys="delay5s",
# no_activity_timeout_in=6800,
# extra_recs={'proxy.config.net.default_inactivity_timeout': 1})
# test2.run()
# QUIC Ignores the default_inactivity_timeout config, so the ts.quic.no_activity_timeout_in
# should be honor
test2 = Test_quic_no_activity_timeout(
"Ignoring default_inactivity_timeout and use the ts.quic.no_activity_timeout_in instead",
replay_keys="delay5s",
no_activity_timeout_in=3000,
extra_recs={'proxy.config.net.default_inactivity_timeout': 1})
test2.run(check_for_max_idle_timeout=True)