I'm not sure why you're saying that the second has to wait for the
first to complete, this is not how it works. If your applications
submits add1 and add2 asynchronously, they will be written
concurrently. Even if add2 is written earlier to its quorum, we only
complete add2 once add1 has completed.
-Flavio
On Dec 23, 2011, at 11:12 AM, Dongdong Guo wrote:
I have done the test, the performance of asynchronous version is
really greater than synchronous version, but my question is below:
To the asynchronous version, I add lots of entries, then wait. but
in fact that the AddOps is done in order, that mean only when the
qSize bookie finished for the first entry, then the second entry can
start
it is same with "synchronous version", where the performance
difference comes
thanks very much
----- 原始邮件 -----
发件人: "Flavio Junqueira" <[email protected]>
收件人: [email protected]
抄送: [email protected]
发送时间: 星期五, 2011年 12 月 23日 下午 5:53:58
主题: Re: Question about "asyncAddEntry"
The different is essentially speed. With the asynchronous version,
you'll have a number of requests outstanding at a time, and you'll
be able to issue more add requests per second (higher throughput).
-Flavio
On Dec 23, 2011, at 10:43 AM, Dongdong Guo wrote:
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
flavio
junqueira
research scientist
[email protected]
direct +34 93-183-8828
avinguda diagonal 177, 8th floor, barcelona, 08018, es
phone (408) 349 3300 fax (408) 349 3301
flavio
junqueira
research scientist
[email protected]
direct +34 93-183-8828
avinguda diagonal 177, 8th floor, barcelona, 08018, es
phone (408) 349 3300 fax (408) 349 3301