redis version:
4.0.2
problem:
In big-dataset scene, when the master restart in short time, sentinel think the master is available because master give "LOADING" as "PING"'s reply. the failover will not trigger because sentinel detect the restart of master, this will make service unavailable utill master finish the loading.
reproduce:
- 3 sentinels. 1 master + 1 slave, enable aof. client get the master info by sentinel.
- kill -9 redis master, then start the redis master.
- sentinel log: 1091433:X 13 Dec 20:03:42.712 * +reboot master mymaster 100.64.0.25 6379
- client get stuck by "Redis is loading the dataset in memory" because failover don't trigger.
In my test of 10GB dataset, client wait almost 200s during master restart.
client code: https://github.com/scenbuffalo/redis/blob/master/utils/cli_redis_stl.py
suggestion
add loading-as-pong option, see scenbuffalo@840df3c
In my test of 10GB dataset, the unavailable time will cut to down-after-milliseconds+2s if set loading-as-pong with no.
If it is necessary, I will make a PR. @antirez
redis version:
4.0.2
problem:
In big-dataset scene, when the master restart in short time, sentinel think the master is available because master give "LOADING" as "PING"'s reply. the failover will not trigger because sentinel detect the restart of master, this will make service unavailable utill master finish the loading.
reproduce:
In my test of 10GB dataset, client wait almost 200s during master restart.
client code: https://github.com/scenbuffalo/redis/blob/master/utils/cli_redis_stl.py
suggestion
add loading-as-pong option, see scenbuffalo@840df3c
In my test of 10GB dataset, the unavailable time will cut to down-after-milliseconds+2s if set loading-as-pong with no.
If it is necessary, I will make a PR. @antirez