-Re: need for more conditional write support
Dave Wright 2010-12-15, 15:06
If this work were to be done, I would much rather prefer the ability
to set multiple values at the same time, as this enables a whole host
of possibilities including certain transactional updating capabilities
that aren't possible now (far too easy to get in an in-consistent
state if you fail partway through updating multiple nodes).
On Wed, Dec 15, 2010 at 2:21 AM, Qian Ye <[EMAIL PROTECTED]> wrote:
> I have read the mails on
> http://www.mail-archive.com/[EMAIL PROTECTED]/msg08315.html,
> and here is some further thinking about this issue.
> The interface like
> zoo_multi_test_and_set(List<int> versions, List<string> znodes,
> List<byte> data）
> can solve the problem I mentioned before, and some relavant issues, like
> hard for programmers to use, as mentioned in mail-archive, should be paid
> attention to. I think we can move small step first, that is, provide
> interface like
> zoo_multi_test_and_set(List<int> versions, List<string> znodes, byte
> data, string znode）
> The API test versions of several different znodes before set one znode, and
> if the client want to set other znode, it can call this API repeatedly.
> Because we only set one node by this API, the result will be straight,
> success or failure. We need not take care of the half-success result.
> How do ur guys think about this API?
> On Fri, Dec 10, 2010 at 11:57 PM, Ted Dunning <[EMAIL PROTECTED]> wrote:
>> Yes. I can imagine that being able to write several variables, specifying
>> the version of each would
>> be useful. But not yet supported.
>> On Fri, Dec 10, 2010 at 12:01 AM, Qian Ye <[EMAIL PROTECTED]> wrote:
>> > What's more, I think this kind of conditional write support is simpler
>> > multiple transactions. Multiple transactions can be built with this kind
>> > support. The link is broken?
> With Regards!
> Ye, Qian