Fix issue where Active Replicas were commiting data to the wrong database under load

Former-commit-id: 50a6a3ca389aef3d8f970faef5336f7053cf4cc5
This commit is contained in:
John Sully 2019-09-06 13:30:15 -04:00
parent 2491f2a23d
commit 8fa118873c

View File

@ -3272,9 +3272,14 @@ void replicaReplayCommand(client *c)
bool fExec = ccmdPrev != serverTL->commandsExecuted;
cFake->lock.unlock();
if (fExec)
{
addReply(c, shared.ok);
selectDb(c, cFake->db->id);
}
else
{
addReplyError(c, "command did not execute");
}
freeClient(cFake);
serverTL->current_client = current_clientSave;