Skip to content

Commit

Permalink
Fix issue where Active Replicas were commiting data to the wrong data…
Browse files Browse the repository at this point in the history
…base under load
  • Loading branch information
JohnSully committed Sep 6, 2019
1 parent f83a89f commit 50a6a3c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/replication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 50a6a3c

Please sign in to comment.