You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@bookkeeper.apache.org by Enrico Olivelli <eo...@gmail.com> on 2017/04/03 14:33:57 UTC

Re: New BookKeeper Proposal "Allow Reads outside the LAC Protocol"

2017-03-31 19:10 GMT+02:00 Matteo Merli <ma...@gmail.com>:

> In this commit from the Yahoo branch we did a similar thing
> https://github.com/yahoo/bookkeeper/commit/92e2f906f83d997b5cf5ffd2bcfcdb
> e53ca3bd04
>
> The idea there was to have a CLI tool to dump the content of a ledger,
> reading all the entries (or a subset of them) without triggering the ledger
> recovery, because a writer might still be present.
> So, the tool keeps reading the leader, past the LAC until it reaches a
> NoEntry error.
>

Thank you Matteo
That's exacly what I meant. But I would like to port it to the standard
client (non-admin)
I will refer to this work in the BP


>
>
>
> On Fri, Mar 31, 2017 at 10:04 AM Sijie Guo <gu...@gmail.com> wrote:
>
>> After taking a look at the proposal, I am not sure if making it a
>> configuration setting is the right approach.
>>
>> However, I would suggest adding a method called #readUncommittedEntries -
>> it would skip the lac checking. so application can decide whether to use
>> readEntries (to read committed entries) or use readUncommittedEntries (to
>> read potentially *uncommitted* entries. So the correctness is managed by
>> application itself (out side of the logic).
>>
>

I see your point. I will update the proposal.

I would call the new method "readUnconfirmedEntries", because the concept
of "commit" is not very clear and BK usually is used as a "commit log" so I
think it would create some confusion.
Does it make sense to you ?



>
>> - Sijie
>>
>> On Thu, Mar 30, 2017 at 8:55 AM, Sijie Guo <gu...@gmail.com> wrote:
>>
>> > + dev@ and moved user@ to cc
>> >
>> > On Thu, Mar 30, 2017 at 8:26 AM, Enrico Olivelli <eo...@gmail.com>
>> > wrote:
>> >
>> >> I would like to share with the community this BookKeeper proposal
>> >>
>> >> https://cwiki.apache.org/confluence/display/BOOKKEEPER/BP-5+
>> >> Allow+reads+outside+the+LAC+Protocol
>> >>
>> >> I will submit a Pull Request to explain the modifications and provide
>> >> test cases
>> >>
>> >> All comments are welcome
>> >>
>> >> -- Enrico
>> >>
>> >
>> >
>>
>

Re: New BookKeeper Proposal "Allow Reads outside the LAC Protocol"

Posted by Sijie Guo <gu...@gmail.com>.
On Mon, Apr 3, 2017 at 7:33 AM, Enrico Olivelli <eo...@gmail.com> wrote:

> 2017-03-31 19:10 GMT+02:00 Matteo Merli <ma...@gmail.com>:
>
> > In this commit from the Yahoo branch we did a similar thing
> > https://github.com/yahoo/bookkeeper/commit/
> 92e2f906f83d997b5cf5ffd2bcfcdb
> > e53ca3bd04
> >
> > The idea there was to have a CLI tool to dump the content of a ledger,
> > reading all the entries (or a subset of them) without triggering the
> ledger
> > recovery, because a writer might still be present.
> > So, the tool keeps reading the leader, past the LAC until it reaches a
> > NoEntry error.
> >
>
> Thank you Matteo
> That's exacly what I meant. But I would like to port it to the standard
> client (non-admin)
> I will refer to this work in the BP
>
>
> >
> >
> >
> > On Fri, Mar 31, 2017 at 10:04 AM Sijie Guo <gu...@gmail.com> wrote:
> >
> >> After taking a look at the proposal, I am not sure if making it a
> >> configuration setting is the right approach.
> >>
> >> However, I would suggest adding a method called #readUncommittedEntries
> -
> >> it would skip the lac checking. so application can decide whether to use
> >> readEntries (to read committed entries) or use readUncommittedEntries
> (to
> >> read potentially *uncommitted* entries. So the correctness is managed by
> >> application itself (out side of the logic).
> >>
> >
>
> I see your point. I will update the proposal.
>
> I would call the new method "readUnconfirmedEntries", because the concept
> of "commit" is not very clear and BK usually is used as a "commit log" so I
> think it would create some confusion.
> Does it make sense to you ?
>

That sounds good. We already called LAC (LastAddConfirmed). So we should
use 'confirmed' across the project.

- Sijie

>
>
>
> >
> >> - Sijie
> >>
> >> On Thu, Mar 30, 2017 at 8:55 AM, Sijie Guo <gu...@gmail.com> wrote:
> >>
> >> > + dev@ and moved user@ to cc
> >> >
> >> > On Thu, Mar 30, 2017 at 8:26 AM, Enrico Olivelli <eolivelli@gmail.com
> >
> >> > wrote:
> >> >
> >> >> I would like to share with the community this BookKeeper proposal
> >> >>
> >> >> https://cwiki.apache.org/confluence/display/BOOKKEEPER/BP-5+
> >> >> Allow+reads+outside+the+LAC+Protocol
> >> >>
> >> >> I will submit a Pull Request to explain the modifications and provide
> >> >> test cases
> >> >>
> >> >> All comments are welcome
> >> >>
> >> >> -- Enrico
> >> >>
> >> >
> >> >
> >>
> >
>

Re: New BookKeeper Proposal "Allow Reads outside the LAC Protocol"

Posted by Sijie Guo <gu...@gmail.com>.
On Mon, Apr 3, 2017 at 7:33 AM, Enrico Olivelli <eo...@gmail.com> wrote:

> 2017-03-31 19:10 GMT+02:00 Matteo Merli <ma...@gmail.com>:
>
> > In this commit from the Yahoo branch we did a similar thing
> > https://github.com/yahoo/bookkeeper/commit/
> 92e2f906f83d997b5cf5ffd2bcfcdb
> > e53ca3bd04
> >
> > The idea there was to have a CLI tool to dump the content of a ledger,
> > reading all the entries (or a subset of them) without triggering the
> ledger
> > recovery, because a writer might still be present.
> > So, the tool keeps reading the leader, past the LAC until it reaches a
> > NoEntry error.
> >
>
> Thank you Matteo
> That's exacly what I meant. But I would like to port it to the standard
> client (non-admin)
> I will refer to this work in the BP
>
>
> >
> >
> >
> > On Fri, Mar 31, 2017 at 10:04 AM Sijie Guo <gu...@gmail.com> wrote:
> >
> >> After taking a look at the proposal, I am not sure if making it a
> >> configuration setting is the right approach.
> >>
> >> However, I would suggest adding a method called #readUncommittedEntries
> -
> >> it would skip the lac checking. so application can decide whether to use
> >> readEntries (to read committed entries) or use readUncommittedEntries
> (to
> >> read potentially *uncommitted* entries. So the correctness is managed by
> >> application itself (out side of the logic).
> >>
> >
>
> I see your point. I will update the proposal.
>
> I would call the new method "readUnconfirmedEntries", because the concept
> of "commit" is not very clear and BK usually is used as a "commit log" so I
> think it would create some confusion.
> Does it make sense to you ?
>

That sounds good. We already called LAC (LastAddConfirmed). So we should
use 'confirmed' across the project.

- Sijie

>
>
>
> >
> >> - Sijie
> >>
> >> On Thu, Mar 30, 2017 at 8:55 AM, Sijie Guo <gu...@gmail.com> wrote:
> >>
> >> > + dev@ and moved user@ to cc
> >> >
> >> > On Thu, Mar 30, 2017 at 8:26 AM, Enrico Olivelli <eolivelli@gmail.com
> >
> >> > wrote:
> >> >
> >> >> I would like to share with the community this BookKeeper proposal
> >> >>
> >> >> https://cwiki.apache.org/confluence/display/BOOKKEEPER/BP-5+
> >> >> Allow+reads+outside+the+LAC+Protocol
> >> >>
> >> >> I will submit a Pull Request to explain the modifications and provide
> >> >> test cases
> >> >>
> >> >> All comments are welcome
> >> >>
> >> >> -- Enrico
> >> >>
> >> >
> >> >
> >>
> >
>