mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 08:38:27 -05:00
Sentinel: config-rewrite unique ID just one time
This commit is contained in:
parent
f9e942d4ae
commit
4dee18cb66
@ -1646,16 +1646,16 @@ void rewriteConfigSentinelOption(struct rewriteConfigState *state) {
|
|||||||
dictEntry *de;
|
dictEntry *de;
|
||||||
sds line;
|
sds line;
|
||||||
|
|
||||||
|
/* sentinel unique ID. */
|
||||||
|
line = sdscatprintf(sdsempty(), "sentinel myid %s", sentinel.myid);
|
||||||
|
rewriteConfigRewriteLine(state,"sentinel",line,1);
|
||||||
|
|
||||||
/* For every master emit a "sentinel monitor" config entry. */
|
/* For every master emit a "sentinel monitor" config entry. */
|
||||||
di = dictGetIterator(sentinel.masters);
|
di = dictGetIterator(sentinel.masters);
|
||||||
while((de = dictNext(di)) != NULL) {
|
while((de = dictNext(di)) != NULL) {
|
||||||
sentinelRedisInstance *master, *ri;
|
sentinelRedisInstance *master, *ri;
|
||||||
sentinelAddr *master_addr;
|
sentinelAddr *master_addr;
|
||||||
|
|
||||||
/* sentinel unique ID. */
|
|
||||||
line = sdscatprintf(sdsempty(), "sentinel myid %s", sentinel.myid);
|
|
||||||
rewriteConfigRewriteLine(state,"sentinel",line,1);
|
|
||||||
|
|
||||||
/* sentinel monitor */
|
/* sentinel monitor */
|
||||||
master = dictGetVal(de);
|
master = dictGetVal(de);
|
||||||
master_addr = sentinelGetCurrentMasterAddress(master);
|
master_addr = sentinelGetCurrentMasterAddress(master);
|
||||||
|
Loading…
Reference in New Issue
Block a user