mirror of
https://github.com/redis/redis.git
synced 2026-04-21 03:01:35 -04:00
generalize error check for SENTINEL MONITOR rumtime config (#8590)
This commit is contained in:
@@ -3710,17 +3710,7 @@ NULL
|
||||
ri = createSentinelRedisInstance(c->argv[2]->ptr,SRI_MASTER,
|
||||
c->argv[3]->ptr,port,quorum,NULL);
|
||||
if (ri == NULL) {
|
||||
switch(errno) {
|
||||
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;
|
||||
}
|
||||
addReplyError(c,sentinelCheckCreateInstanceErrors(SRI_MASTER));
|
||||
} else {
|
||||
sentinelFlushConfig();
|
||||
sentinelEvent(LL_WARNING,"+monitor",ri,"%@ quorum %d",ri->quorum);
|
||||
|
||||
Reference in New Issue
Block a user