Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
6f3d357d
Commit
6f3d357d
authored
Sep 10, 2018
by
antirez
Browse files
Slave removal: slave -> replica in redis.conf and output buffer option.
parent
6f584861
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
redis.conf
View file @
6f3d357d
This diff is collapsed.
Click to expand it.
src/config.c
View file @
6f3d357d
...
@@ -1940,8 +1940,10 @@ void rewriteConfigClientoutputbufferlimitOption(struct rewriteConfigState *state
...
@@ -1940,8 +1940,10 @@ void rewriteConfigClientoutputbufferlimitOption(struct rewriteConfigState *state
rewriteConfigFormatMemory
(
soft
,
sizeof
(
soft
),
rewriteConfigFormatMemory
(
soft
,
sizeof
(
soft
),
server
.
client_obuf_limits
[
j
].
soft_limit_bytes
);
server
.
client_obuf_limits
[
j
].
soft_limit_bytes
);
char
*
typename
=
getClientTypeName
(
j
);
if
(
!
strcmp
(
typename
,
"slave"
))
typename
=
"replica"
;
line
=
sdscatprintf
(
sdsempty
(),
"%s %s %s %s %ld"
,
line
=
sdscatprintf
(
sdsempty
(),
"%s %s %s %s %ld"
,
option
,
getClientT
ype
N
ame
(
j
)
,
hard
,
soft
,
option
,
t
ype
n
ame
,
hard
,
soft
,
(
long
)
server
.
client_obuf_limits
[
j
].
soft_limit_seconds
);
(
long
)
server
.
client_obuf_limits
[
j
].
soft_limit_seconds
);
rewriteConfigRewriteLine
(
state
,
option
,
line
,
force
);
rewriteConfigRewriteLine
(
state
,
option
,
line
,
force
);
}
}
...
...
src/networking.c
View file @
6f3d357d
...
@@ -1991,6 +1991,7 @@ int getClientType(client *c) {
...
@@ -1991,6 +1991,7 @@ int getClientType(client *c) {
int
getClientTypeByName
(
char
*
name
)
{
int
getClientTypeByName
(
char
*
name
)
{
if
(
!
strcasecmp
(
name
,
"normal"
))
return
CLIENT_TYPE_NORMAL
;
if
(
!
strcasecmp
(
name
,
"normal"
))
return
CLIENT_TYPE_NORMAL
;
else
if
(
!
strcasecmp
(
name
,
"slave"
))
return
CLIENT_TYPE_SLAVE
;
else
if
(
!
strcasecmp
(
name
,
"slave"
))
return
CLIENT_TYPE_SLAVE
;
else
if
(
!
strcasecmp
(
name
,
"replica"
))
return
CLIENT_TYPE_SLAVE
;
else
if
(
!
strcasecmp
(
name
,
"pubsub"
))
return
CLIENT_TYPE_PUBSUB
;
else
if
(
!
strcasecmp
(
name
,
"pubsub"
))
return
CLIENT_TYPE_PUBSUB
;
else
if
(
!
strcasecmp
(
name
,
"master"
))
return
CLIENT_TYPE_MASTER
;
else
if
(
!
strcasecmp
(
name
,
"master"
))
return
CLIENT_TYPE_MASTER
;
else
return
-
1
;
else
return
-
1
;
...
...
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