add missed error counting (#9646)
* add: add missed error counting in sentinel.c and cluster.c
This commit is contained in:
+3
-4
@@ -5755,10 +5755,9 @@ socket_err:
|
||||
|
||||
/* Cleanup we want to do if no retry is attempted. */
|
||||
zfree(ov); zfree(kv);
|
||||
addReplySds(c,
|
||||
sdscatprintf(sdsempty(),
|
||||
"-IOERR error or timeout %s to target instance\r\n",
|
||||
write_error ? "writing" : "reading"));
|
||||
addReplyErrorSds(c, sdscatprintf(sdsempty(),
|
||||
"-IOERR error or timeout %s to target instance",
|
||||
write_error ? "writing" : "reading"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+3
-4
@@ -3885,11 +3885,11 @@ NULL
|
||||
if ((ri = sentinelGetMasterByNameOrReplyError(c,c->argv[2])) == NULL)
|
||||
return;
|
||||
if (ri->flags & SRI_FAILOVER_IN_PROGRESS) {
|
||||
addReplySds(c,sdsnew("-INPROG Failover already in progress\r\n"));
|
||||
addReplyError(c,"-INPROG Failover already in progress");
|
||||
return;
|
||||
}
|
||||
if (sentinelSelectSlave(ri) == NULL) {
|
||||
addReplySds(c,sdsnew("-NOGOODSLAVE No suitable replica to promote\r\n"));
|
||||
addReplyError(c,"-NOGOODSLAVE No suitable replica to promote");
|
||||
return;
|
||||
}
|
||||
serverLog(LL_WARNING,"Executing user requested FAILOVER of '%s'",
|
||||
@@ -3978,8 +3978,7 @@ NULL
|
||||
e = sdscat(e, "Not enough available Sentinels to reach the"
|
||||
" majority and authorize a failover");
|
||||
}
|
||||
e = sdscat(e,"\r\n");
|
||||
addReplySds(c,e);
|
||||
addReplyErrorSds(c,e);
|
||||
}
|
||||
} else if (!strcasecmp(c->argv[1]->ptr,"set")) {
|
||||
if (c->argc <= 3) goto numargserr;
|
||||
|
||||
Reference in New Issue
Block a user