You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by Denis Samoilov <sa...@gmail.com> on 2016/06/20 21:33:37 UTC

read under transaction

hi,
I see that there is multi() function to write data under transaction. But
it accepts only mutation operations. Is it possible to read under
transaction somehow (so data will be consistent)?

Thank you!

Re: read under transaction

Posted by Marshall McMullen <ma...@gmail.com>.
There have been similar requests to provide a "batch" operation:
https://issues.apache.org/jira/browse/ZOOKEEPER-1482

Also see https://issues.apache.org/jira/browse/ZOOKEEPER-1407 to allow
adding GetData and GetChildren into existing Multi-operation code.


On Tue, Jun 28, 2016 at 12:39 PM, Alexander Shraer <sh...@gmail.com>
wrote:

> But these writes can be conditional (on the version of the data), which
> could
> probably be used to achieve what you need.
>
> On Tue, Jun 28, 2016 at 11:33 AM, Patrick Hunt <ph...@apache.org> wrote:
>
> > Multi is more of an atomic operation than a "transaction" in the typical
> > sense. See https://issues.apache.org/jira/browse/ZOOKEEPER-965 for some
> > background. I don't believe the original use case involved reading
> multiple
> > znodes, rather updating multiple.
> >
> > Patrick
> >
> > On Mon, Jun 20, 2016 at 2:33 PM, Denis Samoilov <sa...@gmail.com>
> > wrote:
> >
> > > hi,
> > > I see that there is multi() function to write data under transaction.
> But
> > > it accepts only mutation operations. Is it possible to read under
> > > transaction somehow (so data will be consistent)?
> > >
> > > Thank you!
> > >
> >
>

Re: read under transaction

Posted by Alexander Shraer <sh...@gmail.com>.
But these writes can be conditional (on the version of the data), which
could
probably be used to achieve what you need.

On Tue, Jun 28, 2016 at 11:33 AM, Patrick Hunt <ph...@apache.org> wrote:

> Multi is more of an atomic operation than a "transaction" in the typical
> sense. See https://issues.apache.org/jira/browse/ZOOKEEPER-965 for some
> background. I don't believe the original use case involved reading multiple
> znodes, rather updating multiple.
>
> Patrick
>
> On Mon, Jun 20, 2016 at 2:33 PM, Denis Samoilov <sa...@gmail.com>
> wrote:
>
> > hi,
> > I see that there is multi() function to write data under transaction. But
> > it accepts only mutation operations. Is it possible to read under
> > transaction somehow (so data will be consistent)?
> >
> > Thank you!
> >
>

Re: read under transaction

Posted by Patrick Hunt <ph...@apache.org>.
Multi is more of an atomic operation than a "transaction" in the typical
sense. See https://issues.apache.org/jira/browse/ZOOKEEPER-965 for some
background. I don't believe the original use case involved reading multiple
znodes, rather updating multiple.

Patrick

On Mon, Jun 20, 2016 at 2:33 PM, Denis Samoilov <sa...@gmail.com> wrote:

> hi,
> I see that there is multi() function to write data under transaction. But
> it accepts only mutation operations. Is it possible to read under
> transaction somehow (so data will be consistent)?
>
> Thank you!
>