From c303e768bf992ebf9042110faab6a7630e426cfe Mon Sep 17 00:00:00 2001 From: antirez Date: Mon, 25 Jun 2018 16:55:01 +0200 Subject: Sentinel command renaming: config rewriting. --- src/sentinel.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/sentinel.c b/src/sentinel.c index 047d6fbf9..7eb482a3c 100644 --- a/src/sentinel.c +++ b/src/sentinel.c @@ -1870,6 +1870,18 @@ void rewriteConfigSentinelOption(struct rewriteConfigState *state) { rewriteConfigRewriteLine(state,"sentinel",line,1); } dictReleaseIterator(di2); + + /* sentinel rename-command */ + di2 = dictGetIterator(master->renamed_commands); + while((de = dictNext(di2)) != NULL) { + sds oldname = dictGetKey(de); + sds newname = dictGetVal(de); + line = sdscatprintf(sdsempty(), + "sentinel rename-command %s %s %s", + master->name, oldname, newname); + rewriteConfigRewriteLine(state,"sentinel",line,1); + } + dictReleaseIterator(di2); } /* sentinel current-epoch is a global state valid for all the masters. */ -- cgit v1.2.1