You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Abhishek .E.S" <ab...@gmail.com> on 2013/03/26 06:37:19 UTC

Quorum reads on zookeeper

Hi,

Zookeeper suggests using sync if the most up to date value is required for
reading.
Would it be possible to use Quorum reads for ensuring up to date reads ?

There is a function called  isQuorum for indicating quorum requirement for
operations. Read is listed as not requiring forum in this function
How would changing this to true impact the behavior ?

Any pointers would be appreciated.

-Abhishek

Re: Quorum reads on zookeeper

Posted by Ted Dunning <te...@gmail.com>.
Yes.  Sure.

But Abishek's question is pretty basic so it deserved the basic answer.

On Tue, Mar 26, 2013 at 4:19 PM, Alexander Shraer <sh...@gmail.com> wrote:

> Ted, as previously discussed on this list, what you are saying is true
> when the leader doesn't fail but it may not work in the general case
> under some asynchrony conditions. Please see my email "sync semantics"
> from Mar 1st or the thread "Ensure Leader hasn't changed" from
> September 2012. In order to handle the general
> case we should make the sync a quorum operation.
>
> Alex
>
> On Tue, Mar 26, 2013 at 1:21 AM, Ted Dunning <te...@gmail.com>
> wrote:
> > Because the leader is the one who leads all writes, it suffices to catch
> up
> > with that one node.  There is no need to read from a quorum.  Another way
> > to look at this is that there is no way for a quorum read to succeed
> > without there also existing a leader and one read to the leader is better
> > than trying to read from the entire cluster.
> >
> > On Tue, Mar 26, 2013 at 6:37 AM, Abhishek .E.S <abhishek.es@gmail.com
> >wrote:
> >
> >> Hi,
> >>
> >> Zookeeper suggests using sync if the most up to date value is required
> for
> >> reading.
> >> Would it be possible to use Quorum reads for ensuring up to date reads ?
> >>
> >> There is a function called  isQuorum for indicating quorum requirement
> for
> >> operations. Read is listed as not requiring forum in this function
> >> How would changing this to true impact the behavior ?
> >>
> >> Any pointers would be appreciated.
> >>
> >> -Abhishek
> >>
>

Re: Quorum reads on zookeeper

Posted by Alexander Shraer <sh...@gmail.com>.
Ted, as previously discussed on this list, what you are saying is true
when the leader doesn't fail but it may not work in the general case
under some asynchrony conditions. Please see my email "sync semantics"
from Mar 1st or the thread "Ensure Leader hasn't changed" from
September 2012. In order to handle the general
case we should make the sync a quorum operation.

Alex

On Tue, Mar 26, 2013 at 1:21 AM, Ted Dunning <te...@gmail.com> wrote:
> Because the leader is the one who leads all writes, it suffices to catch up
> with that one node.  There is no need to read from a quorum.  Another way
> to look at this is that there is no way for a quorum read to succeed
> without there also existing a leader and one read to the leader is better
> than trying to read from the entire cluster.
>
> On Tue, Mar 26, 2013 at 6:37 AM, Abhishek .E.S <ab...@gmail.com>wrote:
>
>> Hi,
>>
>> Zookeeper suggests using sync if the most up to date value is required for
>> reading.
>> Would it be possible to use Quorum reads for ensuring up to date reads ?
>>
>> There is a function called  isQuorum for indicating quorum requirement for
>> operations. Read is listed as not requiring forum in this function
>> How would changing this to true impact the behavior ?
>>
>> Any pointers would be appreciated.
>>
>> -Abhishek
>>

Re: Quorum reads on zookeeper

Posted by Ted Dunning <te...@gmail.com>.
Because the leader is the one who leads all writes, it suffices to catch up
with that one node.  There is no need to read from a quorum.  Another way
to look at this is that there is no way for a quorum read to succeed
without there also existing a leader and one read to the leader is better
than trying to read from the entire cluster.

On Tue, Mar 26, 2013 at 6:37 AM, Abhishek .E.S <ab...@gmail.com>wrote:

> Hi,
>
> Zookeeper suggests using sync if the most up to date value is required for
> reading.
> Would it be possible to use Quorum reads for ensuring up to date reads ?
>
> There is a function called  isQuorum for indicating quorum requirement for
> operations. Read is listed as not requiring forum in this function
> How would changing this to true impact the behavior ?
>
> Any pointers would be appreciated.
>
> -Abhishek
>