You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bookkeeper.apache.org by Rakesh R <ra...@huawei.com> on 2012/04/12 15:31:49 UTC

Not recovering the first entry, if the client crashes before server response.

Hi,



I would like to know the behaviour of the addEntry api :-



I have created a ledger and adding an entry to it. Say, the entry has successfully sent to the server, but unfortunately the client crashes just before the success response. After this, the recovery operation(by opening the ledger) is failing. I feel, there could be a chance of data loss due to this ?



Thanks,

Rakesh

Re: Not recovering the first entry, if the client crashes before server response.

Posted by Ivan Kelly <iv...@apache.org>.
On Fri, Apr 13, 2012 at 06:14:03AM +0000, Rakesh R wrote:
> Oh sorry! its my problem, I was using the 'asynAddEntry' api and the client has crashed even before sending the entry to the server.
> Thats the reason my 2nd client was not able to see the entry and this is expected behaviour :-) 
> Thanks Ivan for looking into this.
I'm glad you worked it out :)

-Ivan

RE: Not recovering the first entry, if the client crashes before server response.

Posted by Rakesh R <ra...@huawei.com>.
Hi Ivan,

Oh sorry! its my problem, I was using the 'asynAddEntry' api and the client has crashed even before sending the entry to the server.
Thats the reason my 2nd client was not able to see the entry and this is expected behaviour :-) 
Thanks Ivan for looking into this.

Regards,
Rakesh 
________________________________________
From: Ivan Kelly [ivank@apache.org]
Sent: Thursday, April 12, 2012 7:32 PM
To: bookkeeper-dev@zookeeper.apache.org
Subject: Re: Not recovering the first entry, if the client crashes before server response.

On Thu, Apr 12, 2012 at 01:31:49PM +0000, Rakesh R wrote:
> I have created a ledger and adding an entry to it. Say, the entry
> has successfully sent to the server, but unfortunately the client
> crashes just before the success response. After this, the recovery
> operation(by opening the ledger) is failing. I feel, there could be a
> chance of data loss due to this ?
Failing how? The entry doesn't exist? The recovery should be fine in
this case. The lastAddConfirmed should be 0, and the recovery
operation should walk forward from 0 until it finds a entry is missing
(in the case described, it'll find 1, and then not find 2).

Could you give more details on the failure? Stack traces, error codes,
etc?

-Ivan

Re: Not recovering the first entry, if the client crashes before server response.

Posted by Ivan Kelly <iv...@apache.org>.
On Thu, Apr 12, 2012 at 01:31:49PM +0000, Rakesh R wrote:
> I have created a ledger and adding an entry to it. Say, the entry
> has successfully sent to the server, but unfortunately the client
> crashes just before the success response. After this, the recovery
> operation(by opening the ledger) is failing. I feel, there could be a
> chance of data loss due to this ? 
Failing how? The entry doesn't exist? The recovery should be fine in
this case. The lastAddConfirmed should be 0, and the recovery
operation should walk forward from 0 until it finds a entry is missing
(in the case described, it'll find 1, and then not find 2).

Could you give more details on the failure? Stack traces, error codes,
etc?

-Ivan