diff --git a/Documentation/Getting-Started/Configuration-Guide.md b/Documentation/Getting-Started/Configuration-Guide.md index ca221a8cd..45ab3bd99 100644 --- a/Documentation/Getting-Started/Configuration-Guide.md +++ b/Documentation/Getting-Started/Configuration-Guide.md @@ -1450,6 +1450,12 @@ seconds. The interval is incremented until the value of `max_retry_interval` is reached at which point the listener attempts to bind to the interface every `max_retry_interval` seconds. +The value is specified as documented [here](#durations). If no explicit unit +is provided, the value is interpreted as seconds in MaxScale 2.4. In subsequent +versions a value without a unit may be rejected. Note that since the granularity +of the interval is seconds, an interval specified in milliseconds will be rejected, +even if the duration is longer than a second. + #### `session_track_trx_state` Enable or disable session transaction state tracking by offloading it to the backend servers. diff --git a/server/core/config.cc b/server/core/config.cc index 6db0e4ac5..d158a21ea 100644 --- a/server/core/config.cc +++ b/server/core/config.cc @@ -334,8 +334,9 @@ const MXS_MODULE_PARAM config_service_params[] = }, { CN_MAX_RETRY_INTERVAL, - MXS_MODULE_PARAM_COUNT, - "3600" + MXS_MODULE_PARAM_DURATION, + "3600s", + MXS_MODULE_OPT_DURATION_S }, { CN_MAX_CONNECTIONS, diff --git a/server/core/service.cc b/server/core/service.cc index 173fa5c75..1e9fe2938 100644 --- a/server/core/service.cc +++ b/server/core/service.cc @@ -214,7 +214,7 @@ Service::Service(const std::string& name, snprintf(weightby, sizeof(weightby), "%s", m_weightby.c_str()); snprintf(version_string, sizeof(version_string), "%s", m_version_string.c_str()); - max_retry_interval = params->get_integer(CN_MAX_RETRY_INTERVAL); + max_retry_interval = params->get_duration(CN_MAX_RETRY_INTERVAL).count(); users_from_all = params->get_bool(CN_AUTH_ALL_SERVERS); localhost_match_wildcard_host = params->get_bool(CN_LOCALHOST_MATCH_WILDCARD_HOST); retry_start = params->get_bool(CN_RETRY_ON_FAILURE);