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).
-Dave Wright 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? > > Thanks~ > > 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 >> than >> > multiple transactions. Multiple transactions can be built with this kind >> of >> > support. The link is broken? >> > >> > > > > -- > With Regards! > > Ye, Qian >
