Return-Path: X-Original-To: apmail-zookeeper-dev-archive@www.apache.org Delivered-To: apmail-zookeeper-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E7E874D71 for ; Thu, 19 May 2011 02:17:34 +0000 (UTC) Received: (qmail 89189 invoked by uid 500); 19 May 2011 02:17:34 -0000 Delivered-To: apmail-zookeeper-dev-archive@zookeeper.apache.org Received: (qmail 89097 invoked by uid 500); 19 May 2011 02:17:34 -0000 Mailing-List: contact dev-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@zookeeper.apache.org Delivered-To: mailing list dev@zookeeper.apache.org Received: (qmail 89089 invoked by uid 99); 19 May 2011 02:17:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 May 2011 02:17:34 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 May 2011 02:17:31 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id ABB18D0847 for ; Thu, 19 May 2011 02:16:50 +0000 (UTC) Date: Thu, 19 May 2011 02:16:50 +0000 (UTC) From: "jiraposter@reviews.apache.org (JIRA)" To: dev@zookeeper.apache.org Message-ID: <1460415362.25337.1305771410699.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <618906.38111293495645173.JavaMail.jira@thor> Subject: [jira] [Commented] (ZOOKEEPER-965) Need a multi-update command to allow multiple znodes to be updated safely MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/ZOOKEEPER-965?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13035945#comment-13035945 ] jiraposter@reviews.apache.org commented on ZOOKEEPER-965: --------------------------------------------------------- ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/739/ ----------------------------------------------------------- (Updated 2011-05-19 02:13:14.619335) Review request for zookeeper and Benjamin Reed. Changes ------- Added javadocs Summary ------- This mega-patch adds the multi-op capability to ZK. This allows a batch of create, delete, update or version-check operations to succeed or fail together. Both C and java bindings are provided. This addresses bug ZOOKEEPER-965. https://issues.apache.org/jira/browse/ZOOKEEPER-965 Diffs (updated) ----- src/c/Makefile.am 65830fe src/c/include/proto.h 843032f src/c/include/zookeeper.h c055edb src/c/src/zookeeper.c db715b0 src/c/tests/TestMulti.cc PRE-CREATION src/c/tests/TestOperations.cc f9441ea src/c/tests/ZKMocks.cc a75dce6 src/java/main/org/apache/zookeeper/MultiResponse.java PRE-CREATION src/java/main/org/apache/zookeeper/MultiTransactionRecord.java PRE-CREATION src/java/main/org/apache/zookeeper/Op.java PRE-CREATION src/java/main/org/apache/zookeeper/OpResult.java PRE-CREATION src/java/main/org/apache/zookeeper/Transaction.java PRE-CREATION src/java/main/org/apache/zookeeper/ZooDefs.java 832976f src/java/main/org/apache/zookeeper/ZooKeeper.java 00b4012 src/java/main/org/apache/zookeeper/server/DataTree.java d16537e src/java/main/org/apache/zookeeper/server/FinalRequestProcessor.java 2538cf7 src/java/main/org/apache/zookeeper/server/PrepRequestProcessor.java 50f208d src/java/main/org/apache/zookeeper/server/Request.java a5c57e2 src/java/main/org/apache/zookeeper/server/RequestProcessor.java 5c3e8ff src/java/main/org/apache/zookeeper/server/TraceFormatter.java 8ece929 src/java/main/org/apache/zookeeper/server/package.html 3ec7656 src/java/main/org/apache/zookeeper/server/quorum/CommitProcessor.java 49affd5 src/java/main/org/apache/zookeeper/server/util/SerializeUtils.java 0ad4dd6 src/java/test/org/apache/zookeeper/MultiResponseTest.java PRE-CREATION src/java/test/org/apache/zookeeper/MultiTransactionRecordTest.java PRE-CREATION src/java/test/org/apache/zookeeper/test/MultiTransactionTest.java PRE-CREATION src/zookeeper.jute 7d96f32 Diff: https://reviews.apache.org/r/739/diff Testing ------- A number of unit tests have been implemented. Test coverage is very good. A sample application has been written to do simple operations on a graph of nodes. Thanks, Ted > Need a multi-update command to allow multiple znodes to be updated safely > ------------------------------------------------------------------------- > > Key: ZOOKEEPER-965 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-965 > Project: ZooKeeper > Issue Type: Bug > Affects Versions: 3.3.3 > Reporter: Ted Dunning > Assignee: Ted Dunning > Fix For: 3.4.0 > > Attachments: ZOOKEEPER-965.patch, ZOOKEEPER-965.patch, ZOOKEEPER-965.patch, ZOOKEEPER-965.patch, ZOOKEEPER-965.patch, ZOOKEEPER-965.patch, ZOOKEEPER-965.patch, ZOOKEEPER-965.patch, ZOOKEEPER-965.patch, ZOOKEEPER-965.patch, ZOOKEEPER-965.patch, ZOOKEEPER-965.patch, ZOOKEEPER-965.patch, ZOOKEEPER-965.patch > > > The basic idea is to have a single method called "multi" that will accept a list of create, delete, update or check objects each of which has a desired version or file state in the case of create. If all of the version and existence constraints can be satisfied, then all updates will be done atomically. > Two API styles have been suggested. One has a list as above and the other style has a "Transaction" that allows builder-like methods to build a set of updates and a commit method to finalize the transaction. This can trivially be reduced to the first kind of API so the list based API style should be considered the primitive and the builder style should be implemented as syntactic sugar. > The total size of all the data in all updates and creates in a single transaction should be limited to 1MB. > Implementation-wise this capability can be done using standard ZK internals. The changes include: > - update to ZK clients to all the new call > - additional wire level request > - on the server, in the code that converts transactions to idempotent form, the code should be slightly extended to convert a list of operations to idempotent form. > - on the client, a down-rev server that rejects the multi-update should be detected gracefully and an informative exception should be thrown. > To facilitate shared development, I have established a github repository at https://github.com/tdunning/zookeeper and am happy to extend committer status to anyone who agrees to donate their code back to Apache. The final patch will be attached to this bug as normal. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira