소스 검색

Add a comment to explain what put_append returns.

Jing Yang 4 년 전
부모
커밋
e16cb2f9ec
1개의 변경된 파일9개의 추가작업 그리고 0개의 파일을 삭제
  1. 9 0
      kvraft/src/client.rs

+ 9 - 0
kvraft/src/client.rs

@@ -191,6 +191,15 @@ impl ClerkInner {
         }
     }
 
+    /// This function returns None when
+    /// 1. No KVServer can be reached, or
+    /// 2. No KVServer claimed to be the leader.
+    ///
+    /// Some(()) is returned if the request has been committed previously, under
+    /// the assumption is that two different requests with the same unique_id
+    /// must be identical.
+    ///
+    /// This function do not expect a Conflict request with the same unique_id.
     fn put_append(
         &mut self,
         key: String,