소스 검색

etcdserverpb: add "watch_id" to "WatchCreateRequest"

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
Gyuho Lee 8 년 전
부모
커밋
9bbfa23183
1개의 변경된 파일7개의 추가작업 그리고 0개의 파일을 삭제
  1. 7 0
      etcdserver/etcdserverpb/rpc.proto

+ 7 - 0
etcdserver/etcdserverpb/rpc.proto

@@ -671,6 +671,13 @@ message WatchCreateRequest {
   // If prev_kv is set, created watcher gets the previous KV before the event happens.
   // If the previous KV is already compacted, nothing will be returned.
   bool prev_kv = 6;
+
+  // If watch_id is provided and non-zero, it will be assigned to this watcher.
+  // Since creating a watcher in etcd is not a synchronous operation,
+  // this can be used ensure that ordering is correct when creating multiple
+  // watchers on the same stream. Creating a watcher with an ID already in
+  // use on the stream will cause an error to be returned.
+  int64 watch_id = 7;
 }
 
 message WatchCancelRequest {