Explorar o código

Run snapshot daemon before apply command.

Jing Yang %!s(int64=4) %!d(string=hai) anos
pai
achega
c292d0ba65
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  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
     }
 }