• antirez's avatar
    Sentinel test: more correct sentinels config reset. · 6adf0e09
    antirez authored
    In the initialization test for each instance we used to unregister the
    old master and register it again to clear the config.
    However there is a race condition doing this: as soon as we unregister
    and re-register "mymaster", another Sentinel can update the new
    configuration with the old state because of gossip "hello" messages.
    
    So the correct procedure is instead, unregister "mymaster" from all the
    sentinel instances, and re-register it everywhere again.
    6adf0e09
init-tests.tcl 2.26 KB