From e45268930a061ac8d5dc83e9d4ee5a203f494673 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 Former-commit-id: ac595ebe371480a924d542aa62733854eb7c527a --- src/replication.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/replication.cpp b/src/replication.cpp index 736b2ccec..8ea96da1c 100644 --- a/src/replication.cpp +++ b/src/replication.cpp @@ -3284,9 +3284,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;