You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Michael Dykman <md...@gmail.com> on 2015/03/03 18:23:53 UTC

Documentation of batch statements

I have a minor complaint about the documentation.  On the page for Batch
Statements:

http://www.datastax.com/documentation/cql/3.0/cql/cql_reference/batch_r.html

It states: "In the context of a Cassandra batch operation, atomic means
that if any of the batch succeeds, all of it will."

While the above statement may be strictly true, it is misleading.  A more
accurate statement would be

 "...if any of the batch FAILS, all of it will."

As originally written, a naive reader might assume that atomicity pivots on
success; the point of atomicity is reliable failure.

-- 
 - michael dykman
 - mdykman@gmail.com

 May the Source be with you.

Re: Documentation of batch statements

Posted by Peter Lin <wo...@gmail.com>.
I agree with jonathan haddad. A traditional ACID transaction following the
classic definition, isolation is necessary. Having said that, there is
different levels of isolation.

http://en.wikipedia.org/wiki/Isolation_%28database_systems%29#Isolation_levels

Saying the distinction is pendantic is wrong in my bias opinion. These are
well established terms that have been around for over 2 decades. Just
because lots of programmers don't bother to understand the distinction,
doesn't make it any less important.



On Tue, Mar 3, 2015 at 5:56 PM, Jonathan Haddad <jo...@jonhaddad.com> wrote:

> This is often a confusing topic because someone came up with the term
> ACID, which lists isolation as well as atomicity, and as a result most
> people assume they are independent.  This is incorrect.  For something to
> be atomic, it actually requires isolation.
>
> "An operation is atomic if no intermedia states can be observed.  It seems
> to jump directly from the initial state to the result state."
> - Concepts, Techniques, and Models of Computer Programming By Peter
> Van-Roy, Seif Haridi
>
>
>
>
> On Tue, Mar 3, 2015 at 2:30 PM Tyler Hobbs <ty...@datastax.com> wrote:
>
>>
>> On Tue, Mar 3, 2015 at 2:39 PM, Jonathan Haddad <jo...@jonhaddad.com>
>> wrote:
>>
>>> Actually, that's not true either.  It's technically possible for a batch
>>> to be partially applied in the current implementation, even with logged
>>> batches.  "atomic" is used incorrectly here, imo, since more than 2 states
>>> can be visible, unapplied & applied.
>>
>>
>> That's a matter of isolation, not atomicity.  Although, with a long
>> enough gap between partial and full application, the distinction becomes
>> somewhat pedantic, I suppose.
>>
>>
>> --
>> Tyler Hobbs
>> DataStax <http://datastax.com/>
>>
>

Re: Documentation of batch statements

Posted by Jonathan Haddad <jo...@jonhaddad.com>.
This is often a confusing topic because someone came up with the term ACID,
which lists isolation as well as atomicity, and as a result most people
assume they are independent.  This is incorrect.  For something to be
atomic, it actually requires isolation.

"An operation is atomic if no intermedia states can be observed.  It seems
to jump directly from the initial state to the result state."
- Concepts, Techniques, and Models of Computer Programming By Peter
Van-Roy, Seif Haridi




On Tue, Mar 3, 2015 at 2:30 PM Tyler Hobbs <ty...@datastax.com> wrote:

>
> On Tue, Mar 3, 2015 at 2:39 PM, Jonathan Haddad <jo...@jonhaddad.com> wrote:
>
>> Actually, that's not true either.  It's technically possible for a batch
>> to be partially applied in the current implementation, even with logged
>> batches.  "atomic" is used incorrectly here, imo, since more than 2 states
>> can be visible, unapplied & applied.
>
>
> That's a matter of isolation, not atomicity.  Although, with a long enough
> gap between partial and full application, the distinction becomes somewhat
> pedantic, I suppose.
>
>
> --
> Tyler Hobbs
> DataStax <http://datastax.com/>
>

Re: Documentation of batch statements

Posted by Tyler Hobbs <ty...@datastax.com>.
On Tue, Mar 3, 2015 at 2:39 PM, Jonathan Haddad <jo...@jonhaddad.com> wrote:

> Actually, that's not true either.  It's technically possible for a batch
> to be partially applied in the current implementation, even with logged
> batches.  "atomic" is used incorrectly here, imo, since more than 2 states
> can be visible, unapplied & applied.


That's a matter of isolation, not atomicity.  Although, with a long enough
gap between partial and full application, the distinction becomes somewhat
pedantic, I suppose.


-- 
Tyler Hobbs
DataStax <http://datastax.com/>

Re: Documentation of batch statements

Posted by Jonathan Haddad <jo...@jonhaddad.com>.
Actually, that's not true either.  It's technically possible for a batch to
be partially applied in the current implementation, even with logged
batches.  "atomic" is used incorrectly here, imo, since more than 2 states
can be visible, unapplied & applied.

On Tue, Mar 3, 2015 at 9:26 AM Michael Dykman <md...@gmail.com> wrote:

> I have a minor complaint about the documentation.  On the page for Batch
> Statements:
>
> http://www.datastax.com/documentation/cql/3.0/cql/cql_reference/batch_r.html
>
> It states: "In the context of a Cassandra batch operation, atomic means
> that if any of the batch succeeds, all of it will."
>
> While the above statement may be strictly true, it is misleading.  A more
> accurate statement would be
>
>  "...if any of the batch FAILS, all of it will."
>
> As originally written, a naive reader might assume that atomicity pivots
> on success; the point of atomicity is reliable failure.
>
> --
>  - michael dykman
>  - mdykman@gmail.com
>
>  May the Source be with you.
>