From: Arran Cudbard-Bell Date: Tue, 19 Mar 2024 14:55:43 +0000 (-0400) Subject: Revert "Allow command timeout to be set" X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=41e7a90506983be49ed2014c873dc79b8fc58e48;p=thirdparty%2Ffreeradius-server.git Revert "Allow command timeout to be set" This only works for async I/O --- diff --git a/raddb/mods-available/redis b/raddb/mods-available/redis index 4df61d52ce8..e82b4d859c1 100644 --- a/raddb/mods-available/redis +++ b/raddb/mods-available/redis @@ -79,15 +79,6 @@ redis { # # use_cluster_map = yes - # - # command_timeout:: The maximum time allowed for an individual command to execute - # - # Setting to 0.0 disables the timeout. - # - # Default is 0.0 - # -# command_timeout = 0 - # lua { ... }:: # # Configuration options which control the execution of lua scripts diff --git a/src/lib/redis/base.h b/src/lib/redis/base.h index 63bf5b53d5f..ea3061098c4 100644 --- a/src/lib/redis/base.h +++ b/src/lib/redis/base.h @@ -28,8 +28,6 @@ */ RCSIDH(redis_h, "$Id$") -#include - #include #include #include @@ -123,9 +121,6 @@ typedef struct { uint32_t max_retries; //!< Maximum number of times we attempt a command //!< when receiving successive -TRYAGAIN messages. uint32_t max_alt; //!< Maximum alternative nodes to try. - - fr_time_delta_t command_timeout; //!< How long to wait for commands to return. - fr_time_delta_t retry_delay; //!< How long to wait when we received a -TRYAGAIN //!< message. fr_time_delta_t connection_timeout; @@ -145,8 +140,7 @@ typedef struct { { FR_CONF_OFFSET_FLAGS("password", CONF_FLAG_SECRET, fr_redis_conf_t, password) }, \ { FR_CONF_OFFSET("max_nodes", fr_redis_conf_t, max_nodes), .dflt = "20" }, \ { FR_CONF_OFFSET("max_alt", fr_redis_conf_t, max_alt), .dflt = "3" }, \ - { FR_CONF_OFFSET("max_redirects", fr_redis_conf_t, max_redirects), .dflt = "2" }, \ - { FR_CONF_OFFSET("command_timeout", fr_redis_conf_t, reconnection_delay), .dflt = "0" } + { FR_CONF_OFFSET("max_redirects", fr_redis_conf_t, max_redirects), .dflt = "2" } void fr_redis_version_print(void); diff --git a/src/lib/redis/cluster.c b/src/lib/redis/cluster.c index 9f99c401b06..0f86002214f 100644 --- a/src/lib/redis/cluster.c +++ b/src/lib/redis/cluster.c @@ -1481,13 +1481,6 @@ void *fr_redis_cluster_conn_create(TALLOC_CTX *ctx, void *instance, fr_time_delt return NULL; } - /* - * Sets a timeout for synchronous command evaluation - */ - if (fr_time_delta_cmp(node->cluster->conf->command_timeout, fr_time_delta_from_sec(0)) != 0) { - redisSetTimeout(handle, fr_time_delta_to_timeval(node->cluster->conf->command_timeout)); - } - conn = talloc_zero(ctx, fr_redis_conn_t); conn->handle = handle; conn->node = node;