Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
54d01e36
Unverified
Commit
54d01e36
authored
Oct 08, 2021
by
Bjorn Svensson
Committed by
GitHub
Oct 07, 2021
Browse files
Move config `cluster-config-file` to generic configs (#9597)
parent
834e8843
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/config.c
View file @
54d01e36
...
...
@@ -604,9 +604,6 @@ void loadServerConfigFromString(char *config) {
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"
)
&&
argc
==
5
)
{
...
...
@@ -1814,7 +1811,6 @@ int rewriteConfig(char *path, int force_write) {
rewriteConfigUserOption
(
state
);
rewriteConfigDirOption
(
state
);
rewriteConfigSlaveofOption
(
state
,
"replicaof"
);
rewriteConfigStringOption
(
state
,
"cluster-config-file"
,
server
.
cluster_configfile
,
CONFIG_DEFAULT_CLUSTER_CONFIG_FILE
);
rewriteConfigNotifykeyspaceeventsOption
(
state
);
rewriteConfigClientoutputbufferlimitOption
(
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
(
"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-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
(
"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
),
...
...
src/server.c
View file @
54d01e36
...
...
@@ -3197,7 +3197,6 @@ void initServerConfig(void) {
memset
(
server
.
blocked_clients_by_type
,
0
,
sizeof
(
server
.
blocked_clients_by_type
));
server
.
shutdown_asap
=
0
;
server
.
cluster_configfile
=
zstrdup
(
CONFIG_DEFAULT_CLUSTER_CONFIG_FILE
);
server
.
cluster_module_flags
=
CLUSTER_MODULE_FLAG_NONE
;
server
.
migrate_cached_sockets
=
dictCreate
(
&
migrateCacheDictType
);
server
.
next_client_id
=
1
;
/* Client IDs, start from 1 .*/
...
...
src/server.h
View file @
54d01e36
...
...
@@ -112,7 +112,6 @@ typedef long long ustime_t; /* microsecond time type. */
#define CONFIG_REPL_BACKLOG_MIN_SIZE (1024*16)
/* 16k */
#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_CLUSTER_CONFIG_FILE "nodes.conf"
#define CONFIG_DEFAULT_UNIX_SOCKET_PERM 0
#define CONFIG_DEFAULT_LOGFILE ""
#define CONFIG_DEFAULT_BINDADDR_COUNT 2
...
...
tests/unit/introspection.tcl
View file @
54d01e36
...
...
@@ -157,6 +157,7 @@ start_server {tags {"introspection"}} {
aof_rewrite_cpulist
bgsave_cpulist
set-proc-title
cluster-config-file
}
if
{
!$::tls
}
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment