summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2018-06-25 16:55:01 +0200
committerantirez <antirez@gmail.com>2018-06-25 16:55:01 +0200
commitc303e768bf992ebf9042110faab6a7630e426cfe (patch)
tree3bb3b75a38ce7e1fd995ba8896a7dfbe8d4276bd
parent60df7dbea14953a5bab62f59ce0d11b464a7507d (diff)
downloadredis-c303e768bf992ebf9042110faab6a7630e426cfe.tar.gz
Sentinel command renaming: config rewriting.
-rw-r--r--src/sentinel.c12
1 files changed, 12 insertions, 0 deletions
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. */