Dmytro Boichenko
Dmytro Boichenko

Reputation: 5407

Cassandra Lightweight Transaction rpc_timeout

I have Cassandra 2.0.10
cqlsh 4.1.1
cassandra-driver-core-2.1.6
write_request_timeout_in_ms: 2000
ONE node with SimpleStrategy replication

I have table

CREATE TABLE aaa (
  serial text,
  time timestamp,
  id bigint,
  source text,
  PRIMARY KEY ((serial))
) WITH
  bloom_filter_fp_chance=0.010000 AND
  caching='KEYS_ONLY' AND
  comment='' AND
  dclocal_read_repair_chance=0.100000 AND
  gc_grace_seconds=864000 AND
  index_interval=128 AND
  read_repair_chance=0.000000 AND
  replicate_on_write='true' AND
  populate_io_cache_on_flush='false' AND
  default_time_to_live=0 AND
  speculative_retry='99.0PERCENTILE' AND
  memtable_flush_period_in_ms=0 AND
  compaction={'class': 'SizeTieredCompactionStrategy'} AND
  compression={'sstable_compression': 'LZ4Compressor'};

I tried to use Cassandra Lightweight Transaction to put some data to this table

insert into aaa (serial, id, source, time) values ('123', 456, 'test source', '2000-01-01 00:00:00+0000') IF NOT EXISTS;

If I use cqlsh I have reply

Request did not complete within rpc_timeout.

If I use datastax java driver I have an exception

com.datastax.driver.core.exceptions.WriteTimeoutException: Cassandra timeout during write query at consistency SERIAL (1 replica were required but only 0 acknowledged the write)
    at com.datastax.driver.core.exceptions.WriteTimeoutException.copy(WriteTimeoutException.java:54) ~[cassandra-driver-core-2.1.6.jar:na]
    at com.datastax.driver.core.Responses$Error.asException(Responses.java:98) ~[cassandra-driver-core-2.1.6.jar:na]
    at com.datastax.driver.core.DefaultResultSetFuture.onSet(DefaultResultSetFuture.java:140) ~[cassandra-driver-core-2.1.6.jar:na]
...

So it seems I have a problem with cassandra configuration
Maybe somebody helps me :)
Thanks in advance

Upvotes: 2

Views: 403

Answers (2)

Dmytro Boichenko
Dmytro Boichenko

Reputation: 5407

We've upgraded our Cassandra 2.0.10 -> 2.1.9 and it has solved the problem

Upvotes: 0

Jim Meyer
Jim Meyer

Reputation: 9475

I think the timeout error is probably misleading and making the timeout bigger won't help. For some reason the replica that owns that key isn't responding to the request, but I don't see enough information to know what would be causing that.

The insert statement itself looks valid.

One thing I see is that you are using an old version of Cassandra and might want to consider upgrading to a newer release.

Upvotes: 1

Related Questions