• antirez's avatar
    Sentinel: persist its unique ID across restarts. · 794fc4c9
    antirez authored
    Previously Sentinels always changed unique ID across restarts, relying
    on the server.runid field. This is not a good idea, and forced Sentinel
    to rely on detection of duplicated Sentinels and a potentially dangerous
    clean-up and re-add operation of the Sentinel instance that was
    rebooted.
    
    Now the ID is generated at the first start and persisted in the
    configuration file, so that a given Sentinel will have its unique
    ID forever (unless the configuration is manually deleted or there is a
    filesystem corruption).
    794fc4c9
sentinel.c 152 KB