]> git.kaiwu.me - haproxy.git/commitdiff
MINOR: backend: Do not bother stopping if there is only one thread group
authorOlivier Houchard <ohouchard@haproxy.com>
Tue, 18 Aug 2026 15:42:03 +0000 (17:42 +0200)
committerOlivier Houchard <cognet@ci0.org>
Tue, 18 Aug 2026 15:32:45 +0000 (17:32 +0200)
We forbid sharing idle connection across thread groups if there is
per-thread group file descriptor tables, and that will cause an error,
but don't bother doing that if after all, there is only one thread
group.

src/cfgparse.c

index ee86a7b5ae390a8686a67978f908743a1556c232..bf5d46e39a6eb0a44c20c1a76446988dd3c5eacc 100644 (file)
@@ -2345,9 +2345,10 @@ int check_config_validity()
        }
 
        if ((global.tune.tg_takeover == FULL_THREADGROUP_TAKEOVER) &&
-           (global.tune.options & GTUNE_NO_TG_FD_SHARING)) {
+           (global.tune.options & GTUNE_NO_TG_FD_SHARING) &&
+           (global.nbtgroups > 1)) {
                err_code |= ERR_FATAL | ERR_ALERT;
-               ha_alert("tune.fd.tables per-thread-group is incompatible with tune.idle-pool shared full\n");
+               ha_alert("tune.fd.tables per-thread-group is incompatible with tune.idle-pool-shared full\n");
                goto out;
        }
        pool_head_requri = create_pool("requri", global.tune.requri_len , MEM_F_SHARED);