mirror of
https://github.com/fluencelabs/redis
synced 2025-03-17 16:10:50 +00:00
Sentinel: fixes inverted strcmp() test preventing config updates.
The result of this one-char bug was pretty serious, if the new master had the same port of the previous master, but just a different IP address, non-leader Sentinels would not be able to recognize the configuration change. This commit fixes issue #1394. Many thanks to @shanemadden that reported the bug and helped investigating it.
This commit is contained in:
parent
8d547ebd56
commit
6f4fd55762
@ -2025,7 +2025,7 @@ void sentinelReceiveHelloMessages(redisAsyncContext *c, void *reply, void *privd
|
||||
if (msgmaster->config_epoch < master_config_epoch) {
|
||||
msgmaster->config_epoch = master_config_epoch;
|
||||
if (master_port != msgmaster->addr->port ||
|
||||
!strcmp(msgmaster->addr->ip, token[5]))
|
||||
strcmp(msgmaster->addr->ip, token[5]))
|
||||
{
|
||||
sentinelAddr *old_addr;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user