Fix infinite logs of Error in rreplay

Former-commit-id: 00cef78858cd05fc067fa5002f2995653452c63f
This commit is contained in:
John Sully 2020-05-24 20:05:22 -04:00
parent 845027c291
commit 9a357ec4b5

View File

@ -4150,8 +4150,13 @@ void replicaReplayCommand(client *c)
cFake->lock.unlock();
if (cFake->master_error)
{
selectDb(c, cFake->db->id);
freeClient(cFake);
remoteState.cFake = cFake = nullptr;
addReplyError(c, "Error in rreplay command, please check logs.");
}
if (cFake != nullptr)
{
if (fExec || cFake->flags & CLIENT_MULTI)
{
addReply(c, shared.ok);
@ -4165,6 +4170,7 @@ void replicaReplayCommand(client *c)
addReplyError(c, "command did not execute");
}
serverAssert(sdslen(cFake->querybuf) == 0);
}
serverTL->current_client = current_clientSave;
// call() will not propogate this for us, so we do so here