Преглед на файлове

Allow message applying errors in KV server.

Jing Yang преди 4 години
родител
ревизия
de3c5eaf17
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      kvraft/src/server.rs

+ 2 - 2
kvraft/src/server.rs

@@ -101,8 +101,8 @@ impl KVServer {
     ) -> Arc<Self> {
         let (tx, rx) = channel();
         let apply_command = move |message| {
-            tx.send(message)
-                .expect("The receiving end of apply command channel should have not been dropped");
+            // Ignore apply errors.
+            let _ = tx.send(message);
         };
         let snapshot_holder = Arc::new(SnapshotHolder::default());
         let snapshot_holder_clone = snapshot_holder.clone();