Jordan Zimmerman 2012-01-04, 08:47
Ted Dunning 2012-01-04, 15:30
Patrick Hunt 2012-01-04, 17:23
Jordan Zimmerman 2012-01-04, 17:25
Patrick Hunt 2012-01-04, 17:36
Jordan Zimmerman 2012-01-04, 18:03
Patrick Hunt 2012-01-04, 18:20
Jordan Zimmerman 2012-01-04, 18:25
Patrick Hunt 2012-01-04, 18:30
Ted Dunning 2012-01-04, 22:21
-Re: Multi doc?
Marshall McMullen 2012-01-05, 00:43
On Wed, Jan 4, 2012 at 3:21 PM, Ted Dunning <[EMAIL PROTECTED]> wrote:
> > What happens if the transaction has both a setData and a check?
> They happen in sequence, but I couldn't say exactly which version the check
> will see. I suspect that it will see the version before the setData is
It actually depends on the placement of the check in relation to the set
inside the multi-op. If the check is before the set, the check will see the
version before the set, but if the check is after the set, then it will see
the updated version after the set increments it.
Keep in mind two things here:
(1) You may not need the check call at all as the Set() call will fail if
the version number doesn't match the specified version in the Set() call.
(2) Operations inside a multi-op update the state of any zknodes in the
multi-op and all subsequent operations in the multi-op will see that new
(3) If the multi-op fails, all changes are discarded and we roll back to
the prior state.