Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Zookeeper >> mail # dev >> Re: [jira] [Commented] (ZOOKEEPER-1568) multi should have a non-transaction version


Copy link to this message
-
Re: [jira] [Commented] (ZOOKEEPER-1568) multi should have a non-transaction version
I actually think there is a valid use case for this. Mostly for performance
reasons. Because a multi is one transaction, it causes less permuation on
the distributed and replicated state of zookeeper than multiple individual
operations not in a multi.

With a Multi:
- You only pay the cost of the RPC overhead once rather than on each
individual operation
- You get one flush of the leader channel rather than multiple ones for
each write operation
- A multi will case one new snapshot/log to be generated rather than
multiple ones for each operation

There are other reasons that make this a good reason too that are not
performance based. e.g., if it makes the programmer's job easier to use a
multi with these semantics, then that's a win.

In other distributed databases I've worked on, we used different
terminology to disinguish between a multi op that all succeed/fail vs one
that does not. We used the term "Batch" to imply we were batching up
operations but there was no guarantee they'd all succeed/fail.

On Wed, Oct 24, 2012 at 10:44 AM, Jimmy Xiang (JIRA) <[EMAIL PROTECTED]>wrote:

>
>     [
> https://issues.apache.org/jira/browse/ZOOKEEPER-1568?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13483372#comment-13483372]
>
> Jimmy Xiang commented on ZOOKEEPER-1568:
> ----------------------------------------
>
> Yes, that's what we are using now. It is working fine. I was thinking if
> there is still room for improvement.
>
> > multi should have a non-transaction version
> > -------------------------------------------
> >
> >                 Key: ZOOKEEPER-1568
> >                 URL:
> https://issues.apache.org/jira/browse/ZOOKEEPER-1568
> >             Project: ZooKeeper
> >          Issue Type: Improvement
> >            Reporter: Jimmy Xiang
> >
> > Currently multi is transactional, i.e. all or none.  However, sometimes,
> we don't want that.  We want all operations to be executed.  Even some
> operation(s) fails, it is ok. We just need to know the result of each
> operation.
>
> --
> This message is automatically generated by JIRA.
> If you think it was sent incorrectly, please contact your JIRA
> administrators
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB