thanks very much, I have saw the source code, but I have another question

I use "asyncAddEntry" to add lots of entries, but it is done in order, what is 
difference with using "addEntry" to add lots of entries

----- 原始邮件 -----
发件人: "Ivan Kelly" <[email protected]>
收件人: [email protected]
发送时间: 星期五, 2011年 12 月 23日 下午 5:33:28
主题: Re: Question about "asyncAddEntry"

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 < [email protected] > 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" < [email protected] > 
收件人: [email protected] 
发送时间: 星期四, 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 


Reply via email to