You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@bookkeeper.apache.org by dennis zhuang <ki...@gmail.com> on 2011/11/30 09:25:37 UTC

Write 5 entries,but can only read 4 entries

Hi,everyone

I create a LedgerHandle to write five entires to bookkeeper,then close it
and open a new LedgerHandle in recovery mode to read entries from
bookkeeper.

I use readLastConfirmed to get the last confirmed entry id for reading,it
should return 4 but  actually 3.I don't know why this happened?why can't
read the last entry?

Anybody help me? Thanks.



-- 
庄晓丹
Email:        killme2008@gmail.com
伯岩(花名)  boyan@taobao.com
Site:           http://fnil.net

淘宝(中国)软件有限公司 / 产品技术部 / Java中间件

Re: Write 5 entries,but can only read 4 entries

Posted by Sijie Guo <gu...@gmail.com>.
Thanks, dennis.

will be fixed in BOOKKEEPER-129 .

Thanks,
Sijie

2011/11/30 dennis zhuang <ki...@gmail.com>

> It's a good news.
> An issue in ClientConfiguration, i submit it here:
>
> public ClientConfiguration setZkTimeout(int zkTimeout) {
>         setProperty(ZK_SERVERS, Integer.toString(zkTimeout));
>         return this;
>     }
>
> setZkTimeout must set ZK_TIMEOUT value,not ZK_SERVERS.
>
> The code in the trunk.
>
>
> 在 2011年11月30日 下午5:28,Flavio Junqueira <fp...@yahoo-inc.com>写道:
>
> We are trying to get a release candidate right now, so an official release
>> should be out next week if we have no issue.
>>
>> -Flavio
>>
>> On Nov 30, 2011, at 10:24 AM, dennis zhuang wrote:
>>
>> Thanks flavio.
>> Is there a bookkeeper release plan? I prefer to use a stable version.
>>
>> 在 2011年11月30日 下午5:14,Flavio Junqueira <fp...@yahoo-inc.com>写道:
>>
>>> Hi Dennis, readLastConfirmed will read the last confirmed read from
>>> bookies and should be used when executing the open ledger call that doesn't
>>> recover. If you are executing a regular openLedger call,
>>> then getLastAddConfirmed is what you should use, since this is the value
>>> read from the corresponding znode in zookeeper.
>>>
>>> -Flavio
>>>
>>> On Nov 30, 2011, at 10:09 AM, dennis zhuang wrote:
>>>
>>> It is strange that if i use getLastAddConfirmed to get the entry id,
>>> it's all right.
>>>
>>> 在 2011年11月30日 下午4:25,dennis zhuang <ki...@gmail.com>写道:
>>>
>>>> Hi,everyone
>>>>
>>>> I create a LedgerHandle to write five entires to bookkeeper,then close
>>>> it and open a new LedgerHandle in recovery mode to read entries from
>>>> bookkeeper.
>>>>
>>>> I use readLastConfirmed to get the last confirmed entry id for
>>>> reading,it should return 4 but  actually 3.I don't know why this
>>>> happened?why can't read the last entry?
>>>>
>>>> Anybody help me? Thanks.
>>>>
>>>>
>>>>
>>>> --
>>>> 庄晓丹
>>>> Email:        killme2008@gmail.com
>>>> 伯岩(花名)  boyan@taobao.com
>>>> Site:           http://fnil.net
>>>>
>>>> 淘宝(中国)软件有限公司 / 产品技术部 / Java中间件
>>>>
>>>>
>>>
>>>
>>> --
>>> 庄晓丹
>>> Email:        killme2008@gmail.com
>>> 伯岩(花名)  boyan@taobao.com
>>> Site:           http://fnil.net
>>>
>>> 淘宝(中国)软件有限公司 / 产品技术部 / Java中间件
>>>
>>>
>>>   *flavio*
>>> *junqueira*
>>>
>>> research scientist
>>>
>>> fpj@yahoo-inc.com
>>> direct +34 93-183-8828
>>>
>>> avinguda diagonal 177, 8th floor, barcelona, 08018, es
>>> phone (408) 349 3300    fax (408) 349 3301
>>>
>>>
>>
>>
>> --
>> 庄晓丹
>> Email:        killme2008@gmail.com
>> 伯岩(花名)  boyan@taobao.com
>> Site:           http://fnil.net
>>
>> 淘宝(中国)软件有限公司 / 产品技术部 / Java中间件
>>
>>
>>   *flavio*
>> *junqueira*
>>
>> research scientist
>>
>> fpj@yahoo-inc.com
>> direct +34 93-183-8828
>>
>> avinguda diagonal 177, 8th floor, barcelona, 08018, es
>> phone (408) 349 3300    fax (408) 349 3301
>>
>>
>
>
> --
> 庄晓丹
> Email:        killme2008@gmail.com
> 伯岩(花名)  boyan@taobao.com
> Site:           http://fnil.net
>
> 淘宝(中国)软件有限公司 / 产品技术部 / Java中间件
>
>

Re: Write 5 entries,but can only read 4 entries

Posted by dennis zhuang <ki...@gmail.com>.
It's a good news.
An issue in ClientConfiguration, i submit it here:

public ClientConfiguration setZkTimeout(int zkTimeout) {
        setProperty(ZK_SERVERS, Integer.toString(zkTimeout));
        return this;
    }

setZkTimeout must set ZK_TIMEOUT value,not ZK_SERVERS.

The code in the trunk.


在 2011年11月30日 下午5:28,Flavio Junqueira <fp...@yahoo-inc.com>写道:

> We are trying to get a release candidate right now, so an official release
> should be out next week if we have no issue.
>
> -Flavio
>
> On Nov 30, 2011, at 10:24 AM, dennis zhuang wrote:
>
> Thanks flavio.
> Is there a bookkeeper release plan? I prefer to use a stable version.
>
> 在 2011年11月30日 下午5:14,Flavio Junqueira <fp...@yahoo-inc.com>写道:
>
>> Hi Dennis, readLastConfirmed will read the last confirmed read from
>> bookies and should be used when executing the open ledger call that doesn't
>> recover. If you are executing a regular openLedger call,
>> then getLastAddConfirmed is what you should use, since this is the value
>> read from the corresponding znode in zookeeper.
>>
>> -Flavio
>>
>> On Nov 30, 2011, at 10:09 AM, dennis zhuang wrote:
>>
>> It is strange that if i use getLastAddConfirmed to get the entry id, it's
>> all right.
>>
>> 在 2011年11月30日 下午4:25,dennis zhuang <ki...@gmail.com>写道:
>>
>>> Hi,everyone
>>>
>>> I create a LedgerHandle to write five entires to bookkeeper,then close
>>> it and open a new LedgerHandle in recovery mode to read entries from
>>> bookkeeper.
>>>
>>> I use readLastConfirmed to get the last confirmed entry id for
>>> reading,it should return 4 but  actually 3.I don't know why this
>>> happened?why can't read the last entry?
>>>
>>> Anybody help me? Thanks.
>>>
>>>
>>>
>>> --
>>> 庄晓丹
>>> Email:        killme2008@gmail.com
>>> 伯岩(花名)  boyan@taobao.com
>>> Site:           http://fnil.net
>>>
>>> 淘宝(中国)软件有限公司 / 产品技术部 / Java中间件
>>>
>>>
>>
>>
>> --
>> 庄晓丹
>> Email:        killme2008@gmail.com
>> 伯岩(花名)  boyan@taobao.com
>> Site:           http://fnil.net
>>
>> 淘宝(中国)软件有限公司 / 产品技术部 / Java中间件
>>
>>
>>   *flavio*
>> *junqueira*
>>
>> research scientist
>>
>> fpj@yahoo-inc.com
>> direct +34 93-183-8828
>>
>> avinguda diagonal 177, 8th floor, barcelona, 08018, es
>> phone (408) 349 3300    fax (408) 349 3301
>>
>>
>
>
> --
> 庄晓丹
> Email:        killme2008@gmail.com
> 伯岩(花名)  boyan@taobao.com
> Site:           http://fnil.net
>
> 淘宝(中国)软件有限公司 / 产品技术部 / Java中间件
>
>
>   *flavio*
> *junqueira*
>
> research scientist
>
> fpj@yahoo-inc.com
> direct +34 93-183-8828
>
> avinguda diagonal 177, 8th floor, barcelona, 08018, es
> phone (408) 349 3300    fax (408) 349 3301
>
>


-- 
庄晓丹
Email:        killme2008@gmail.com
伯岩(花名)  boyan@taobao.com
Site:           http://fnil.net

淘宝(中国)软件有限公司 / 产品技术部 / Java中间件

Re: Write 5 entries,but can only read 4 entries

Posted by Flavio Junqueira <fp...@yahoo-inc.com>.
We are trying to get a release candidate right now, so an official  
release should be out next week if we have no issue.

-Flavio

On Nov 30, 2011, at 10:24 AM, dennis zhuang wrote:

> Thanks flavio.
> Is there a bookkeeper release plan? I prefer to use a stable version.
>
> 在 2011年11月30日 下午5:14,Flavio Junqueira <fp...@yahoo-inc.com>写道:
> Hi Dennis, readLastConfirmed will read the last confirmed read from  
> bookies and should be used when executing the open ledger call that  
> doesn't recover. If you are executing a regular openLedger call,  
> then getLastAddConfirmed is what you should use, since this is the  
> value read from the corresponding znode in zookeeper.
>
> -Flavio
>
> On Nov 30, 2011, at 10:09 AM, dennis zhuang wrote:
>
>> It is strange that if i use getLastAddConfirmed to get the entry  
>> id, it's all right.
>>
>> 在 2011年11月30日 下午4:25,dennis zhuang <ki...@gmail.com>写 
>> 道:
>> Hi,everyone
>>
>> I create a LedgerHandle to write five entires to bookkeeper,then  
>> close it and open a new LedgerHandle in recovery mode to read  
>> entries from bookkeeper.
>>
>> I use readLastConfirmed to get the last confirmed entry id for  
>> reading,it should return 4 but  actually 3.I don't know why this  
>> happened?why can't read the last entry?
>>
>> Anybody help me? Thanks.
>>
>>
>>
>> -- 
>> 庄晓丹
>> Email:        killme2008@gmail.com
>> 伯岩(花名)  boyan@taobao.com
>> Site:           http://fnil.net
>>
>> 淘宝(中国)软件有限公司 / 产品技术部 / Java中间件
>>
>>
>>
>>
>> -- 
>> 庄晓丹
>> Email:        killme2008@gmail.com
>> 伯岩(花名)  boyan@taobao.com
>> Site:           http://fnil.net
>>
>> 淘宝(中国)软件有限公司 / 产品技术部 / Java中间件
>>
>
> flavio
> junqueira
>
> research scientist
>
> fpj@yahoo-inc.com
> direct +34 93-183-8828
>
> avinguda diagonal 177, 8th floor, barcelona, 08018, es
> phone (408) 349 3300    fax (408) 349 3301
>
>
>
>
> -- 
> 庄晓丹
> Email:        killme2008@gmail.com
> 伯岩(花名)  boyan@taobao.com
> Site:           http://fnil.net
>
> 淘宝(中国)软件有限公司 / 产品技术部 / Java中间件
>

flavio
junqueira

research scientist

fpj@yahoo-inc.com
direct +34 93-183-8828

avinguda diagonal 177, 8th floor, barcelona, 08018, es
phone (408) 349 3300    fax (408) 349 3301


Re: Write 5 entries,but can only read 4 entries

Posted by dennis zhuang <ki...@gmail.com>.
Thanks flavio.
Is there a bookkeeper release plan? I prefer to use a stable version.

在 2011年11月30日 下午5:14,Flavio Junqueira <fp...@yahoo-inc.com>写道:

> Hi Dennis, readLastConfirmed will read the last confirmed read from
> bookies and should be used when executing the open ledger call that doesn't
> recover. If you are executing a regular openLedger call,
> then getLastAddConfirmed is what you should use, since this is the value
> read from the corresponding znode in zookeeper.
>
> -Flavio
>
> On Nov 30, 2011, at 10:09 AM, dennis zhuang wrote:
>
> It is strange that if i use getLastAddConfirmed to get the entry id, it's
> all right.
>
> 在 2011年11月30日 下午4:25,dennis zhuang <ki...@gmail.com>写道:
>
>> Hi,everyone
>>
>> I create a LedgerHandle to write five entires to bookkeeper,then close it
>> and open a new LedgerHandle in recovery mode to read entries from
>> bookkeeper.
>>
>> I use readLastConfirmed to get the last confirmed entry id for reading,it
>> should return 4 but  actually 3.I don't know why this happened?why can't
>> read the last entry?
>>
>> Anybody help me? Thanks.
>>
>>
>>
>> --
>> 庄晓丹
>> Email:        killme2008@gmail.com
>> 伯岩(花名)  boyan@taobao.com
>> Site:           http://fnil.net
>>
>> 淘宝(中国)软件有限公司 / 产品技术部 / Java中间件
>>
>>
>
>
> --
> 庄晓丹
> Email:        killme2008@gmail.com
> 伯岩(花名)  boyan@taobao.com
> Site:           http://fnil.net
>
> 淘宝(中国)软件有限公司 / 产品技术部 / Java中间件
>
>
>   *flavio*
> *junqueira*
>
> research scientist
>
> fpj@yahoo-inc.com
> direct +34 93-183-8828
>
> avinguda diagonal 177, 8th floor, barcelona, 08018, es
> phone (408) 349 3300    fax (408) 349 3301
>
>


-- 
庄晓丹
Email:        killme2008@gmail.com
伯岩(花名)  boyan@taobao.com
Site:           http://fnil.net

淘宝(中国)软件有限公司 / 产品技术部 / Java中间件

Re: Write 5 entries,but can only read 4 entries

Posted by Flavio Junqueira <fp...@yahoo-inc.com>.
Hi Dennis, readLastConfirmed will read the last confirmed read from  
bookies and should be used when executing the open ledger call that  
doesn't recover. If you are executing a regular openLedger call, then  
getLastAddConfirmed is what you should use, since this is the value  
read from the corresponding znode in zookeeper.

-Flavio

On Nov 30, 2011, at 10:09 AM, dennis zhuang wrote:

> It is strange that if i use getLastAddConfirmed to get the entry id,  
> it's all right.
>
> 在 2011年11月30日 下午4:25,dennis zhuang <ki...@gmail.com>写道:
> Hi,everyone
>
> I create a LedgerHandle to write five entires to bookkeeper,then  
> close it and open a new LedgerHandle in recovery mode to read  
> entries from bookkeeper.
>
> I use readLastConfirmed to get the last confirmed entry id for  
> reading,it should return 4 but  actually 3.I don't know why this  
> happened?why can't read the last entry?
>
> Anybody help me? Thanks.
>
>
>
> -- 
> 庄晓丹
> Email:        killme2008@gmail.com
> 伯岩(花名)  boyan@taobao.com
> Site:           http://fnil.net
>
> 淘宝(中国)软件有限公司 / 产品技术部 / Java中间件
>
>
>
>
> -- 
> 庄晓丹
> Email:        killme2008@gmail.com
> 伯岩(花名)  boyan@taobao.com
> Site:           http://fnil.net
>
> 淘宝(中国)软件有限公司 / 产品技术部 / Java中间件
>

flavio
junqueira

research scientist

fpj@yahoo-inc.com
direct +34 93-183-8828

avinguda diagonal 177, 8th floor, barcelona, 08018, es
phone (408) 349 3300    fax (408) 349 3301


Re: Write 5 entries,but can only read 4 entries

Posted by dennis zhuang <ki...@gmail.com>.
It is strange that if i use getLastAddConfirmed to get the entry id, it's
all right.

在 2011年11月30日 下午4:25,dennis zhuang <ki...@gmail.com>写道:

> Hi,everyone
>
> I create a LedgerHandle to write five entires to bookkeeper,then close it
> and open a new LedgerHandle in recovery mode to read entries from
> bookkeeper.
>
> I use readLastConfirmed to get the last confirmed entry id for reading,it
> should return 4 but  actually 3.I don't know why this happened?why can't
> read the last entry?
>
> Anybody help me? Thanks.
>
>
>
> --
> 庄晓丹
> Email:        killme2008@gmail.com
> 伯岩(花名)  boyan@taobao.com
> Site:           http://fnil.net
>
> 淘宝(中国)软件有限公司 / 产品技术部 / Java中间件
>
>


-- 
庄晓丹
Email:        killme2008@gmail.com
伯岩(花名)  boyan@taobao.com
Site:           http://fnil.net

淘宝(中国)软件有限公司 / 产品技术部 / Java中间件