From afc7e08a20da95d6facf8357a82b7321cb64cfcf Mon Sep 17 00:00:00 2001 From: antirez Date: Tue, 17 Jul 2018 17:42:25 +0200 Subject: [PATCH] Panic when we are sending an error to our master/slave. Related to #5135, see discussion there. --- src/networking.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/networking.c b/src/networking.c index f6882f69..22850a4b 100644 --- a/src/networking.c +++ b/src/networking.c @@ -349,6 +349,11 @@ void addReplyErrorLength(client *c, const char *s, size_t len) { serverLog(LL_WARNING,"== CRITICAL == This %s is sending an error " "to its %s: '%s' after processing the command " "'%s'", from, to, s, cmdname); + /* Here we want to panic because when an instance is sending an + * error to another instance in the context of replication, this can + * only create some kind of offset or data desynchronization. Better + * to catch it ASAP and crash instead of continuing. */ + serverPanic("Continuing is unsafe: replication protocol violation."); } }