I have a question about redis sentinel when there is a network partition
I started a redis server on server01 as master and a server on server02 as slave, there was a redis sentinel on another server, I setup a script to make the client point to the new master when failover。
Then a partition occurred isolating the master on server01, so the sentinel start a failover on server02, and the slave of server02 become the new master. All the clients are using the new master now, which is okay.
When the partition recovered, however, sentinel will send slaveof
to the old master. The old master will then remove all the data and sync with the new master, even there is little difference between new master and old master. When there is more than one master-slave group, the sync command will take up all my bandwidth in my production environment.
So how to disable the auto slaveof? Is there a better idea?