• Ozan Tezcan's avatar
    Add support to rebuild configuration after a restart (#125) · 9c09a6cc
    Ozan Tezcan authored
    Configuration changes are special in Raft. They take effect 
    whenever the related log entries are appended. On a restart, 
    we should go over the log entries and rebuild the configuration.
    
    Adding raft_restore_log() function for this purpose.
    
    Overall, on a restart, application should do:
    
    Load the snapshot and call raft_restore_snapshot()
    Load the log entries and call raft_restore_log()
    Read the metadata file and call raft_restore_metadata().
    9c09a6cc
test_server.c 157 KB