Fix issue where Active Replicas were commiting data to the wrong database under load
Former-commit-id: ac595ebe371480a924d542aa62733854eb7c527a
This commit is contained in:
parent
a21a7a8ee9
commit
e45268930a
@ -3284,9 +3284,14 @@ void replicaReplayCommand(client *c)
|
|||||||
bool fExec = ccmdPrev != serverTL->commandsExecuted;
|
bool fExec = ccmdPrev != serverTL->commandsExecuted;
|
||||||
cFake->lock.unlock();
|
cFake->lock.unlock();
|
||||||
if (fExec)
|
if (fExec)
|
||||||
|
{
|
||||||
addReply(c, shared.ok);
|
addReply(c, shared.ok);
|
||||||
|
selectDb(c, cFake->db->id);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
addReplyError(c, "command did not execute");
|
addReplyError(c, "command did not execute");
|
||||||
|
}
|
||||||
freeClient(cFake);
|
freeClient(cFake);
|
||||||
serverTL->current_client = current_clientSave;
|
serverTL->current_client = current_clientSave;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user