Thanks a lot Tsz-Wo!

Tsz Wo Sze <[email protected]> 于2019年10月2日周三 下午12:24写道:

> For write requests, the success RaftClientReply will include the log
> index for that request.
>
> For other requests, the log index in RaftClientReply is 0.
>
> For any requests, the commit indies of each server can be found in
> commit infos (see RaftClientReply.getCommitInfos()), if available.
>
> Tsz-Wo
>
> On Wed, Oct 2, 2019 at 11:51 AM Zili Chen <[email protected]> wrote:
> >
> > Thanks for the clarification! It helps indeed.
> >
> > One more question, does client always get index of log from
> RaftClientReply?
> >
> > Best,
> > tison.
> >
> >
> > Tsz Wo Sze <[email protected]> 于2019年10月2日周三 上午11:27写道:
> >>
> >> 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.
>

Reply via email to