mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 16:18:28 -05:00
Move config cluster-config-file
to generic configs (#9597)
This commit is contained in:
parent
834e8843de
commit
54d01e363a
@ -604,9 +604,6 @@ void loadServerConfigFromString(char *config) {
|
|||||||
err = "Target command name already exists"; goto loaderr;
|
err = "Target command name already exists"; goto loaderr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (!strcasecmp(argv[0],"cluster-config-file") && argc == 2) {
|
|
||||||
zfree(server.cluster_configfile);
|
|
||||||
server.cluster_configfile = zstrdup(argv[1]);
|
|
||||||
} else if (!strcasecmp(argv[0],"client-output-buffer-limit") &&
|
} else if (!strcasecmp(argv[0],"client-output-buffer-limit") &&
|
||||||
argc == 5)
|
argc == 5)
|
||||||
{
|
{
|
||||||
@ -1814,7 +1811,6 @@ int rewriteConfig(char *path, int force_write) {
|
|||||||
rewriteConfigUserOption(state);
|
rewriteConfigUserOption(state);
|
||||||
rewriteConfigDirOption(state);
|
rewriteConfigDirOption(state);
|
||||||
rewriteConfigSlaveofOption(state,"replicaof");
|
rewriteConfigSlaveofOption(state,"replicaof");
|
||||||
rewriteConfigStringOption(state,"cluster-config-file",server.cluster_configfile,CONFIG_DEFAULT_CLUSTER_CONFIG_FILE);
|
|
||||||
rewriteConfigNotifykeyspaceeventsOption(state);
|
rewriteConfigNotifykeyspaceeventsOption(state);
|
||||||
rewriteConfigClientoutputbufferlimitOption(state);
|
rewriteConfigClientoutputbufferlimitOption(state);
|
||||||
rewriteConfigOOMScoreAdjValuesOption(state);
|
rewriteConfigOOMScoreAdjValuesOption(state);
|
||||||
@ -2606,6 +2602,7 @@ standardConfig configs[] = {
|
|||||||
createStringConfig("replica-announce-ip", "slave-announce-ip", MODIFIABLE_CONFIG, EMPTY_STRING_IS_NULL, server.slave_announce_ip, NULL, NULL, NULL),
|
createStringConfig("replica-announce-ip", "slave-announce-ip", MODIFIABLE_CONFIG, EMPTY_STRING_IS_NULL, server.slave_announce_ip, NULL, NULL, NULL),
|
||||||
createStringConfig("masteruser", NULL, MODIFIABLE_CONFIG | SENSITIVE_CONFIG, EMPTY_STRING_IS_NULL, server.masteruser, NULL, NULL, NULL),
|
createStringConfig("masteruser", NULL, MODIFIABLE_CONFIG | SENSITIVE_CONFIG, EMPTY_STRING_IS_NULL, server.masteruser, NULL, NULL, NULL),
|
||||||
createStringConfig("cluster-announce-ip", NULL, MODIFIABLE_CONFIG, EMPTY_STRING_IS_NULL, server.cluster_announce_ip, NULL, NULL, NULL),
|
createStringConfig("cluster-announce-ip", NULL, MODIFIABLE_CONFIG, EMPTY_STRING_IS_NULL, server.cluster_announce_ip, NULL, NULL, NULL),
|
||||||
|
createStringConfig("cluster-config-file", NULL, IMMUTABLE_CONFIG, ALLOW_EMPTY_STRING, server.cluster_configfile, "nodes.conf", NULL, NULL),
|
||||||
createStringConfig("syslog-ident", NULL, IMMUTABLE_CONFIG, ALLOW_EMPTY_STRING, server.syslog_ident, "redis", NULL, NULL),
|
createStringConfig("syslog-ident", NULL, IMMUTABLE_CONFIG, ALLOW_EMPTY_STRING, server.syslog_ident, "redis", NULL, NULL),
|
||||||
createStringConfig("dbfilename", NULL, MODIFIABLE_CONFIG, ALLOW_EMPTY_STRING, server.rdb_filename, "dump.rdb", isValidDBfilename, NULL),
|
createStringConfig("dbfilename", NULL, MODIFIABLE_CONFIG, ALLOW_EMPTY_STRING, server.rdb_filename, "dump.rdb", isValidDBfilename, NULL),
|
||||||
createStringConfig("appendfilename", NULL, IMMUTABLE_CONFIG, ALLOW_EMPTY_STRING, server.aof_filename, "appendonly.aof", isValidAOFfilename, NULL),
|
createStringConfig("appendfilename", NULL, IMMUTABLE_CONFIG, ALLOW_EMPTY_STRING, server.aof_filename, "appendonly.aof", isValidAOFfilename, NULL),
|
||||||
|
@ -3197,7 +3197,6 @@ void initServerConfig(void) {
|
|||||||
memset(server.blocked_clients_by_type,0,
|
memset(server.blocked_clients_by_type,0,
|
||||||
sizeof(server.blocked_clients_by_type));
|
sizeof(server.blocked_clients_by_type));
|
||||||
server.shutdown_asap = 0;
|
server.shutdown_asap = 0;
|
||||||
server.cluster_configfile = zstrdup(CONFIG_DEFAULT_CLUSTER_CONFIG_FILE);
|
|
||||||
server.cluster_module_flags = CLUSTER_MODULE_FLAG_NONE;
|
server.cluster_module_flags = CLUSTER_MODULE_FLAG_NONE;
|
||||||
server.migrate_cached_sockets = dictCreate(&migrateCacheDictType);
|
server.migrate_cached_sockets = dictCreate(&migrateCacheDictType);
|
||||||
server.next_client_id = 1; /* Client IDs, start from 1 .*/
|
server.next_client_id = 1; /* Client IDs, start from 1 .*/
|
||||||
|
@ -112,7 +112,6 @@ typedef long long ustime_t; /* microsecond time type. */
|
|||||||
#define CONFIG_REPL_BACKLOG_MIN_SIZE (1024*16) /* 16k */
|
#define CONFIG_REPL_BACKLOG_MIN_SIZE (1024*16) /* 16k */
|
||||||
#define CONFIG_BGSAVE_RETRY_DELAY 5 /* Wait a few secs before trying again. */
|
#define CONFIG_BGSAVE_RETRY_DELAY 5 /* Wait a few secs before trying again. */
|
||||||
#define CONFIG_DEFAULT_PID_FILE "/var/run/redis.pid"
|
#define CONFIG_DEFAULT_PID_FILE "/var/run/redis.pid"
|
||||||
#define CONFIG_DEFAULT_CLUSTER_CONFIG_FILE "nodes.conf"
|
|
||||||
#define CONFIG_DEFAULT_UNIX_SOCKET_PERM 0
|
#define CONFIG_DEFAULT_UNIX_SOCKET_PERM 0
|
||||||
#define CONFIG_DEFAULT_LOGFILE ""
|
#define CONFIG_DEFAULT_LOGFILE ""
|
||||||
#define CONFIG_DEFAULT_BINDADDR_COUNT 2
|
#define CONFIG_DEFAULT_BINDADDR_COUNT 2
|
||||||
|
@ -157,6 +157,7 @@ start_server {tags {"introspection"}} {
|
|||||||
aof_rewrite_cpulist
|
aof_rewrite_cpulist
|
||||||
bgsave_cpulist
|
bgsave_cpulist
|
||||||
set-proc-title
|
set-proc-title
|
||||||
|
cluster-config-file
|
||||||
}
|
}
|
||||||
|
|
||||||
if {!$::tls} {
|
if {!$::tls} {
|
||||||
|
Loading…
Reference in New Issue
Block a user