bookkeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan Kelly <iv...@apache.org>
Subject Re: Question about "asyncAddEntry"
Date Fri, 23 Dec 2011 09:33:28 GMT
See:
https://github.com/apache/bookkeeper/blob/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java#L426

Basically, the SafeRunnable is added to the worker thread in order, so
these get run in order. The SafeRunnable added the op to pendingAddOps, and
runs the op. If an add op error unrecoverably, all operations after the
failed operation are failed by the ledger handle, see errorOutPendingAdds.

-Ivan



On 23 December 2011 09:12, Dongdong Guo <guodd@rd.netease.com> wrote:

> I saw the source code, but i can not find the place where bookkeeper add
> entries in order, could you tell me  where ?
>
> thanks
>
> ----- 原始邮件 -----
> 发件人: "Ivan Kelly" <ivank@apache.org>
> 收件人: bookkeeper-user@zookeeper.apache.org
> 发送时间: 星期四, 2011年 12 月 22日 下午 7:35:11
> 主题: Re: Question about "asyncAddEntry"
>
> On Thu, Dec 22, 2011 at 07:25:40PM +0800, Dongdong Guo wrote:
> > I use the "asyncAddEntry" and add lots of  data, then wait finished, if
> the first entry failed, is it possible that the subsequence entry success
> No, bookkeeper will add entries in order. If an add op fails
> completely, then all subsequent add ops will be errored, and the
> ledger will be forced to close.
>
> -Ivan
>

Mime
View raw message