The default global configuration tuning settings (tune.memory.hot-size,
expose-experimental-directives, and tune.pipesize) were lost when the
-G option was used.
The bug was caused by an incorrect scope: these default settings were
nested inside the block that generates the default global header, which
is skipped/overwritten when -G is provided. Fix this by closing the
conditional block early.
This patch depends on this commit:
"
01f4e33ea MINOR: hbuf: new lightweight hbuf API"
Must be backported to 3.4.
ha_alert("failed to allocate a buffer.\n");
goto leave;
}
+
hbuf_appendf(&gbuf, "global\n");
- hbuf_appendf(&gbuf, "\ttune.memory.hot-size 3145728\n");
- if (has_ssl)
- hbuf_appendf(&gbuf, "\texpose-experimental-directives\n");
+ }
+
+ hbuf_appendf(&gbuf, "\ttune.memory.hot-size 3145728\n");
+ if (has_ssl)
+ hbuf_appendf(&gbuf, "\texpose-experimental-directives\n");
#if defined(USE_LINUX_SPLICE) && defined(HA_USE_KTLS)
- if (has_ssl)
- hbuf_appendf(&gbuf, "\ttune.pipesize 262144\n");
+ if (has_ssl)
+ hbuf_appendf(&gbuf, "\ttune.pipesize 262144\n");
#endif
- }
/* "global" section */
if (!hbuf_is_null(&gbuf))