Commit eef51884 authored by Geoff Simmons's avatar Geoff Simmons

trackrdrd: unless otherwise specified, qlen_goal = maxdone/2

parent 78705f7d
......@@ -105,6 +105,10 @@ int
CONF_Add(const char *lval, const char *rval)
{
int ret;
static bool qlen_configured = false;
if (strcmp(lval, "qlen.goal") == 0)
qlen_configured = true;
confString("pid.file", pid_file);
confString("varnish.name", varnish_name);
......@@ -114,7 +118,6 @@ CONF_Add(const char *lval, const char *rval)
confString("mq.qname", mq_qname);
confUnsigned("maxopen.scale", maxopen_scale);
confUnsigned("maxdone", maxdone);
confUnsigned("maxdata", maxdata);
confUnsigned("qlen.goal", qlen_goal);
confUnsigned("hash.max_probes", hash_max_probes);
......@@ -125,6 +128,17 @@ CONF_Add(const char *lval, const char *rval)
confUnsigned("restarts", restarts);
confUnsigned("monitor.interval", monitor_interval);
if (strcmp(lval, "maxdone") == 0) {
unsigned int i;
int err = conf_getUnsignedInt(rval, &i);
if (err != 0)
return err;
config.maxdone = i;
if (!qlen_configured)
config.qlen_goal = config.maxdone >> 1;
return(0);
}
if (strcmp(lval, "syslog.facility") == 0) {
if ((ret = conf_getFacility(rval)) < 0)
return EINVAL;
......
......@@ -22,7 +22,7 @@ CMD="../trackrdrd -D -f varnish.binlog -l - -d -c test.conf"
# the user running it
CKSUM=$( $CMD | sed -e 's/\(initializing\) \(.*\)/\1/' | sed -e 's/\(Running as\) \([a-zA-Z0-9]*\)$/\1/' | grep -v 'Not running as root' | cksum)
if [ "$CKSUM" != '3826901182 234120' ]; then
if [ "$CKSUM" != '1848318102 234119' ]; then
echo "ERROR: Regression test incorrect cksum: $CKSUM"
exit 1
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment