Sfoglia il codice sorgente

Run snapshot daemon before apply command.

Jing Yang 4 anni fa
parent
commit
c292d0ba65
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 2 1
      src/lib.rs

+ 2 - 1
src/lib.rs

@@ -194,6 +194,8 @@ where
 
         this.keep_running.store(true, Ordering::SeqCst);
         // Running in a standalone thread.
+        this.run_snapshot_daemon(max_state_size_bytes, request_snapshot);
+        // Running in a standalone thread.
         this.run_log_entry_daemon();
         // Running in a standalone thread.
         this.run_apply_command_daemon(apply_command);
@@ -204,7 +206,6 @@ where
         ));
         // The last step is to start running election timer.
         this.run_election_timer();
-        this.run_snapshot_daemon(max_state_size_bytes, request_snapshot);
         this
     }
 }