mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 09:00:51 +00:00
Making sentinel flush config on +slave
Originally, only the +slave event which occurs when a slave is reconfigured during sentinelResetMasterAndChangeAddress triggers a flush of the config to disk. However, newly discovered slaves don't apparently trigger this flush but do trigger the +slave event issuance. So if you start up a sentinel, add a master, then add a slave to the master (as a way to reproduce it) you'll see the +slave event issued, but the sentinel config won't be updated with the known-slave entry. This change makes sentinel do the flush of the config if a new slave is deteted in sentinelRefreshInstanceInfo.
This commit is contained in:
parent
99c93f34a7
commit
cc799d253f
@ -1847,6 +1847,7 @@ void sentinelRefreshInstanceInfo(sentinelRedisInstance *ri, const char *info) {
|
|||||||
atoi(port), ri->quorum, ri)) != NULL)
|
atoi(port), ri->quorum, ri)) != NULL)
|
||||||
{
|
{
|
||||||
sentinelEvent(REDIS_NOTICE,"+slave",slave,"%@");
|
sentinelEvent(REDIS_NOTICE,"+slave",slave,"%@");
|
||||||
|
sentinelFlushConfig();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user