From 50a6a3ca389aef3d8f970faef5336f7053cf4cc5 Mon Sep 17 00:00:00 2001 From: John Sully Date: Fri, 6 Sep 2019 13:30:15 -0400 Subject: [PATCH] Fix issue where Active Replicas were commiting data to the wrong database under load --- src/replication.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/replication.cpp b/src/replication.cpp index 461a2fd92..52ba568a6 100644 --- a/src/replication.cpp +++ b/src/replication.cpp @@ -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;