Thanks for the question. /** Async call to watch the given index to satisfy the given replication level. */ CompletableFuture<RaftClientReply> sendWatchAsync(long index, ReplicationLevel replication);
/** Watch the given index to satisfy the given replication level. */ RaftClientReply sendWatch(long index, ReplicationLevel replication) throws IOException; sendWatch/sendWatchAsync are to watch a particular log index to reach the given replication level. By default, a write request is replied if replication MAJORITY is satisfied. However, some applications (e.g. Apache Hadoop Ozone) may require a more strict replication level such as ALL or ALL_COMMITTED. Then, they may send a watch request to wait for it. Hope it helps. Tsz-Wo On Wed, Oct 2, 2019 at 10:35 AM Zili Chen <[email protected]> wrote: > > Hi ratis, > > Noticed that RaftClient has a method setWatch(idx, replicationLevel) I think > it is quite different from > "Watcher" mechanism in etcd or zk. After a bit of look I don't understand > what this method used > for. > > Could you kindly share the intention we have this method? > > Best, > tison.
