]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Remove the limit on the number of simultaneous TCP queries
authorOndřej Surý <ondrej@isc.org>
Thu, 27 Jan 2022 09:08:06 +0000 (10:08 +0100)
committerEvan Hunt <each@isc.org>
Fri, 18 Feb 2022 00:19:12 +0000 (16:19 -0800)
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
lib/isc/netmgr/netmgr.c

index 4f8db118ea3fc0904ec85f25131aeb43d65cc464..3a849b6c4b7052ed9be2252d349f826daaab8934 100644 (file)
@@ -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, \
index 409838befd81aacacc69f41ebcb3fbab9f88afea..4676135b9c452963361aa8f70265631ee43e8ec3 100644 (file)
@@ -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;
                        }