From bd0bfe4d0558fdf645f9887683eb2bf42aa129e8 Mon Sep 17 00:00:00 2001 From: John Sully Date: Wed, 4 Mar 2020 15:14:41 -0500 Subject: [PATCH] min-clients-per-thread needs to use the new config code Former-commit-id: fed4bd5269a95a24f99d4542ceece09b9ad66d2c --- src/config.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/config.cpp b/src/config.cpp index 8f6cfbad5..de32ae85f 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -540,11 +540,6 @@ void loadServerConfigFromString(char *config) { } else if (!strcasecmp(argv[0],"enable-pro")) { cserver.fUsePro = true; break; - } else if (!strcasecmp(argv[0],"min-clients-per-thread") && argc == 2) { - cserver.thread_min_client_threshold = atoi(argv[1]); - if (cserver.thread_min_client_threshold < 0 || cserver.thread_min_client_threshold > 400) { - err = "min-thread-client must be between 0 and 400"; goto loaderr; - } } else { err = "Bad directive or wrong number of arguments"; goto loaderr; } @@ -2315,6 +2310,7 @@ standardConfig configs[] = { createIntConfig("hz", NULL, MODIFIABLE_CONFIG, 0, INT_MAX, g_pserver->config_hz, CONFIG_DEFAULT_HZ, INTEGER_CONFIG, NULL, updateHZ), createIntConfig("min-replicas-to-write", "min-slaves-to-write", MODIFIABLE_CONFIG, 0, INT_MAX, g_pserver->repl_min_slaves_to_write, 0, INTEGER_CONFIG, NULL, updateGoodSlaves), createIntConfig("min-replicas-max-lag", "min-slaves-max-lag", MODIFIABLE_CONFIG, 0, INT_MAX, g_pserver->repl_min_slaves_max_lag, 10, INTEGER_CONFIG, NULL, updateGoodSlaves), + createIntConfig("min-clients-per-thread", NULL, MODIFIABLE_CONFIG, 0, 400, cserver.thread_min_client_threshold, 50, INTEGER_CONFIG, NULL, NULL), /* Unsigned int configs */ createUIntConfig("maxclients", NULL, MODIFIABLE_CONFIG, 1, UINT_MAX, g_pserver->maxclients, 10000, INTEGER_CONFIG, NULL, updateMaxclients),