You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bookkeeper.apache.org by Maciej Smoleński <je...@gmail.com> on 2014/12/08 13:54:10 UTC

Question about fencing

Recently I read about Bookkeeper fencing protocol.
I didn't find the answer to my question in the protocol description so I'm
asking here:

When the ledger is fenced, the bookies are instructed to not accept new
writes, but to accept only recoveryWrites.
For correctness this should be saved to a persistent storage.
I expect that it is enough to save this info persistently at the bookie
server.
Am I right, does it work in Bookkeeper this way ?

Re: Question about fencing

Posted by Flavio Junqueira <fp...@yahoo.com.INVALID>.
Just to complement Sijie's answer, check it here:

https://github.com/apache/bookkeeper/blob/master/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Bookie.java#L1133 <https://github.com/apache/bookkeeper/blob/master/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Bookie.java#L1133>

-Flavio

> On 08 Dec 2014, at 19:18, Sijie Guo <gu...@gmail.com> wrote:
> 
> Correct. When a ledger is fenced, the client will send a fence read request
> to all bookies. Each bookie would mark the ledger as fenced and persist the
> fence state on disk. Following normal writes to that ledger will be
> rejected.
> 
> - Sijie
> 
> On Mon, Dec 8, 2014 at 4:54 AM, Maciej Smoleński <je...@gmail.com> wrote:
> 
>> Recently I read about Bookkeeper fencing protocol.
>> I didn't find the answer to my question in the protocol description so I'm
>> asking here:
>> 
>> When the ledger is fenced, the bookies are instructed to not accept new
>> writes, but to accept only recoveryWrites.
>> For correctness this should be saved to a persistent storage.
>> I expect that it is enough to save this info persistently at the bookie
>> server.
>> Am I right, does it work in Bookkeeper this way ?
>> 


Re: Question about fencing

Posted by Sijie Guo <gu...@gmail.com>.
Correct. When a ledger is fenced, the client will send a fence read request
to all bookies. Each bookie would mark the ledger as fenced and persist the
fence state on disk. Following normal writes to that ledger will be
rejected.

- Sijie

On Mon, Dec 8, 2014 at 4:54 AM, Maciej Smoleński <je...@gmail.com> wrote:

> Recently I read about Bookkeeper fencing protocol.
> I didn't find the answer to my question in the protocol description so I'm
> asking here:
>
> When the ledger is fenced, the bookies are instructed to not accept new
> writes, but to accept only recoveryWrites.
> For correctness this should be saved to a persistent storage.
> I expect that it is enough to save this info persistently at the bookie
> server.
> Am I right, does it work in Bookkeeper this way ?
>