ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Igor Rudyak <irud...@gmail.com>
Subject Re: Batch support in Cassandra store
Date Tue, 26 Jul 2016 21:53:26 GMT
Hi Valentin,

For writeAll/readAll Cassandra cache store implementation uses async
operations (http://www.datastax.com/dev/blog/java-driver-async-queries) and
futures, which has the best characteristics in terms of performance.

Cassandra BATCH statement is actually quite often anti-pattern for those
who come from relational world. BATCH statement concept in Cassandra is
totally different from relational world and is not for optimizing
batch/bulk operations. The main purpose of Cassandra BATCH is to keep
denormalized data in sync. For example when you duplicating the same data
into several tables. All other cases are not recommended for Cassandra
batches:
 -
https://medium.com/@foundev/cassandra-batch-loading-without-the-batch-keyword-40f00e35e23e#.k4xfir8ij
 -
http://christopher-batey.blogspot.com/2015/02/cassandra-anti-pattern-misuse-of.html
 - https://inoio.de/blog/2016/01/13/cassandra-to-batch-or-not-to-batch/

It's also good to mention that in CassandraCacheStore implementation
(actually in CassandraSessionImpl) all operation with Cassandra is wrapped
in a loop. The reason is in a case of failure it will be performed 20
attempts to retry the operation with incrementally increasing timeouts
starting from 100ms and specific exception handling logic (Cassandra hosts
unavailability and etc.). Thus it provides quite reliable persistence
mechanism. According to load tests, even on heavily overloaded Cassandra
cluster (CPU LOAD > 10 per one core) there were no lost
writes/reads/deletes and maximum 6 attempts to perform one operation.

Igor Rudyak

On Tue, Jul 26, 2016 at 1:58 PM, Valentin Kulichenko <
valentin.kulichenko@gmail.com> wrote:

> Hi Igor,
>
> I noticed that current Cassandra store implementation doesn't support
> batching for writeAll and deleteAll methods, it simply executes all updates
> one by one (asynchronously in parallel).
>
> I think it can be useful to provide such support and created a ticket [1].
> Can you please give your input on this? Does it make sense in your opinion?
>
> [1] https://issues.apache.org/jira/browse/IGNITE-3588
>
> -Val
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message