瀏覽代碼

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();