]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Revert "Allow command timeout to be set"
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 19 Mar 2024 14:55:43 +0000 (10:55 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 19 Mar 2024 14:56:17 +0000 (10:56 -0400)
This only works for async I/O

raddb/mods-available/redis
src/lib/redis/base.h
src/lib/redis/cluster.c

index 4df61d52ce8fe4104e8858defbc02b371af74a49..e82b4d859c1adcb4369b33c8db28dd2a5cba8a35 100644 (file)
@@ -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
index 63bf5b53d5ff5ab3b4128bec0c04adc5396c1783..ea3061098c4704c6f1e9f8770e24fd5309b719ce 100644 (file)
@@ -28,8 +28,6 @@
  */
 RCSIDH(redis_h, "$Id$")
 
-#include <freeradius-devel/util/time.h>
-
 #include <freeradius-devel/server/base.h>
 #include <freeradius-devel/server/map.h>
 #include <freeradius-devel/server/module.h>
@@ -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);
 
index 9f99c401b06575a301b6c97699d69e507ca578b1..0f86002214f06e4b2e32226734906322318e31b3 100644 (file)
@@ -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;