Hi DuyHai,

thanks for your answer. What if I set RF > 1 and the consistency level for reads and writes to QUORUM? Would that isolate the single-partition batch update from reads? (I do not consider node failures here between the write and the read(s)).

On 19.05.15 07:50, DuyHai Doan wrote:
Hello Martin

If, and only if you have RF=1, single partition mutations (including batches) are isolated.

Otherwise, with RF>1, even a simple UPDATE is not isolated because one client can read the updated value on one replica and another client reads the old value on another replica



On Mon, May 18, 2015 at 12:32 PM, Martin Krasser <krass...@googlemail.com <mailto:krass...@googlemail.com>> wrote:

    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 <http://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 <http://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



--
Martin Krasser

blog:    http://krasserm.github.io
code:    http://github.com/krasserm
twitter: http://twitter.com/mrt1nz

Reply via email to