From 4f5b4662b600a709fdcacaa97e7c67b5745e45bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Thu, 27 Jan 2022 10:08:06 +0100 Subject: [PATCH 1/2] Remove the limit on the number of simultaneous TCP queries There was an artificial limit of 23 on the number of simultaneous pipelined queries in the single TCP connection. The new network managers is capable of handling "unlimited" (limited only by the TCP read buffer size ) queries similar to "unlimited" handling of the DNS queries receive over UDP. Don't limit the number of TCP queries that we can process within a single TCP read callback. --- lib/isc/netmgr/netmgr-int.h | 8 -------- lib/isc/netmgr/netmgr.c | 10 +++------- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/lib/isc/netmgr/netmgr-int.h b/lib/isc/netmgr/netmgr-int.h index 4f8db118ea..3a849b6c4b 100644 --- a/lib/isc/netmgr/netmgr-int.h +++ b/lib/isc/netmgr/netmgr-int.h @@ -2097,14 +2097,6 @@ isc__nmsocket_readtimeout_cb(uv_timer_t *timer); void isc__nmsocket_writetimeout_cb(uv_timer_t *timer); -/*%< - * - * Maximum number of simultaneous handles in flight supported for a single - * connected TCPDNS socket. This value was chosen arbitrarily, and may be - * changed in the future. - */ -#define STREAM_CLIENTS_PER_CONN 23 - #define UV_RUNTIME_CHECK(func, ret) \ if (ret != 0) { \ isc_error_fatal(__FILE__, __LINE__, "%s failed: %s\n", #func, \ diff --git a/lib/isc/netmgr/netmgr.c b/lib/isc/netmgr/netmgr.c index 409838befd..4676135b9c 100644 --- a/lib/isc/netmgr/netmgr.c +++ b/lib/isc/netmgr/netmgr.c @@ -2335,10 +2335,8 @@ processbuffer(isc_nmsocket_t *sock) { * timers. If we do have a full message, reset the timer. * * Stop reading if this is a client socket, or if the server socket - * has been set to sequential mode, or the number of queries we are - * processing simultaneously has reached the clients-per-connection - * limit. In this case we'll be called again later by - * isc__nm_resume_processing(). + * has been set to sequential mode. In this case we'll be called again + * later by isc__nm_resume_processing(). */ void isc__nm_process_sock_buffer(isc_nmsocket_t *sock) { @@ -2375,9 +2373,7 @@ isc__nm_process_sock_buffer(isc_nmsocket_t *sock) { isc__nmsocket_timer_stop(sock); if (atomic_load(&sock->client) || - atomic_load(&sock->sequential) || - ah >= STREAM_CLIENTS_PER_CONN) - { + atomic_load(&sock->sequential)) { isc__nm_stop_reading(sock); return; } From 2bcf5a531583b50db1f184bfb7dd96117ed7d806 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Thu, 10 Feb 2022 11:48:01 +0100 Subject: [PATCH 2/2] Add CHANGES and release note for [GL #3141] --- CHANGES | 3 +++ doc/notes/notes-current.rst | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/CHANGES b/CHANGES index 0bf0969fd8..b3674015c5 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +5812. [func] Drop the artificial limit on the number of queries + processed in a single TCP read callback. [GL #3141] + 5811. [bug] Reimplement the maximum and idle timeouts for outgoing zone tranfers. [GL #1897] diff --git a/doc/notes/notes-current.rst b/doc/notes/notes-current.rst index 075b68f5be..2da69354f6 100644 --- a/doc/notes/notes-current.rst +++ b/doc/notes/notes-current.rst @@ -48,6 +48,10 @@ Feature Changes scans, and other events that require exclusive access to a shared resources). :gl:`#3137` +- The limit on the number of simultaneously processed pipelined DNS queries + received over TCP has been dropped. Previously, it was capped at 23 + queries processed at the same time. :gl:`#3141` + Bug Fixes ~~~~~~~~~