diff options
author | antirez <antirez@gmail.com> | 2018-06-25 16:55:01 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2018-06-25 16:55:01 +0200 |
commit | c303e768bf992ebf9042110faab6a7630e426cfe (patch) | |
tree | 3bb3b75a38ce7e1fd995ba8896a7dfbe8d4276bd | |
parent | 60df7dbea14953a5bab62f59ce0d11b464a7507d (diff) | |
download | redis-c303e768bf992ebf9042110faab6a7630e426cfe.tar.gz |
Sentinel command renaming: config rewriting.
-rw-r--r-- | src/sentinel.c | 12 |
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. */ |