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
257009af
Unverified
Commit
257009af
authored
Mar 03, 2021
by
Wen Hui
Committed by
GitHub
Mar 03, 2021
Browse files
generalize error check for SENTINEL MONITOR rumtime config (#8590)
parent
5d180d28
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/sentinel.c
View file @
257009af
...
@@ -3710,17 +3710,7 @@ NULL
...
@@ -3710,17 +3710,7 @@ NULL
ri
=
createSentinelRedisInstance
(
c
->
argv
[
2
]
->
ptr
,
SRI_MASTER
,
ri
=
createSentinelRedisInstance
(
c
->
argv
[
2
]
->
ptr
,
SRI_MASTER
,
c
->
argv
[
3
]
->
ptr
,
port
,
quorum
,
NULL
);
c
->
argv
[
3
]
->
ptr
,
port
,
quorum
,
NULL
);
if
(
ri
==
NULL
)
{
if
(
ri
==
NULL
)
{
switch
(
errno
)
{
addReplyError
(
c
,
sentinelCheckCreateInstanceErrors
(
SRI_MASTER
));
case
EBUSY
:
addReplyError
(
c
,
"Duplicated master name"
);
break
;
case
EINVAL
:
addReplyError
(
c
,
"Invalid port number"
);
break
;
default:
addReplyError
(
c
,
"Unspecified error adding the instance"
);
break
;
}
}
else
{
}
else
{
sentinelFlushConfig
();
sentinelFlushConfig
();
sentinelEvent
(
LL_WARNING
,
"+monitor"
,
ri
,
"%@ quorum %d"
,
ri
->
quorum
);
sentinelEvent
(
LL_WARNING
,
"+monitor"
,
ri
,
"%@ quorum %d"
,
ri
->
quorum
);
...
...
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