Multiple inserts for the same partition key within a batch will be consolidated 
into a single row update operation (since 2.0.6, 
#6737<https://issues.apache.org/jira/browse/CASSANDRA-6737>). Ie. you get the 
same row level isolation<http://www.datastax.com/dev/blog/row-level-isolation> 
guarantees as any single write operation on that key.


Von: Martin Krasser [mailto:krass...@googlemail.com]
Gesendet: Montag, 18. Mai 2015 12:32
An: user@cassandra.apache.org
Betreff: Batch isolation within a single partition

Hello,

I have an application that inserts multiple rows within a single partition (= 
all rows share the same partition key) using a BATCH statement. Is it possible 
that other clients can partially read that batch or is the batch application 
isolated i.e. other clients can only read all rows of that batch or none of 
them?

I understand that a BATCH update to multiple partitions is not isolated but I'm 
not sure if this is also the case for a single partition:

- The article Atomic batches in Cassandra 
1.2<http://www.datastax.com/dev/blog/atomic-batches-in-cassandra-1-2> says that 
"... we mean atomic in the database sense that if any part of the batch 
succeeds, all of it will. No other guarantees are implied; in particular, there 
is no isolation".

- On the other hand, the CQL 
BATCH<https://cassandra.apache.org/doc/cql3/CQL.html#batchStmt> docs at 
cassandra.apache.org mention that " ... the [batch] operations are still only 
isolated within a single partition" which is a clear statement but doesn't it 
contradict the previous and the next one?

- The CQL 
BATCH<http://docs.datastax.com/en/cql/3.1/cql/cql_reference/batch_r.html> docs 
at docs.datastax.com mention that "... there is no batch isolation. Clients are 
able to read the first updated rows from the batch, while other rows are still 
being updated on the server. However, transactional row updates within a 
partition key are isolated: clients cannot read a partial update". Also, what 
does "transactional row updates" mean in this context? A lightweight 
transaction? Something else?

Thanks for any help,
Martin

Reply via email to