mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 09:00:51 +00:00
Cluster: move cluster config file out of config state.
This makes us able to avoid allocating the cluster state structure if cluster is not enabled, but still we can handle the configuration directive that sets the cluster config filename.
This commit is contained in:
parent
1649e509c3
commit
1a32d99b28
@ -375,8 +375,8 @@ void loadServerConfigFromString(char *config) {
|
|||||||
err = "argument must be 'yes' or 'no'"; goto loaderr;
|
err = "argument must be 'yes' or 'no'"; goto loaderr;
|
||||||
}
|
}
|
||||||
} else if (!strcasecmp(argv[0],"cluster-config-file") && argc == 2) {
|
} else if (!strcasecmp(argv[0],"cluster-config-file") && argc == 2) {
|
||||||
zfree(server.cluster->configfile);
|
zfree(server.cluster_configfile);
|
||||||
server.cluster->configfile = zstrdup(argv[1]);
|
server.cluster_configfile = zstrdup(argv[1]);
|
||||||
} else if (!strcasecmp(argv[0],"lua-time-limit") && argc == 2) {
|
} else if (!strcasecmp(argv[0],"lua-time-limit") && argc == 2) {
|
||||||
server.lua_time_limit = strtoll(argv[1],NULL,10);
|
server.lua_time_limit = strtoll(argv[1],NULL,10);
|
||||||
} else if (!strcasecmp(argv[0],"slowlog-log-slower-than") &&
|
} else if (!strcasecmp(argv[0],"slowlog-log-slower-than") &&
|
||||||
|
@ -560,7 +560,6 @@ struct clusterNode {
|
|||||||
typedef struct clusterNode clusterNode;
|
typedef struct clusterNode clusterNode;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char *configfile;
|
|
||||||
clusterNode *myself; /* This node */
|
clusterNode *myself; /* This node */
|
||||||
int state; /* REDIS_CLUSTER_OK, REDIS_CLUSTER_FAIL, ... */
|
int state; /* REDIS_CLUSTER_OK, REDIS_CLUSTER_FAIL, ... */
|
||||||
int node_timeout;
|
int node_timeout;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user