incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Xu <jimxu...@gmail.com>
Subject Lightweight transaction timeout
Date Mon, 02 Dec 2013 06:48:18 GMT
Hi all,

I use two threads to test lightweight transaction, each thread execute
"insert into test_table(column1,column2) values (i, thread_id) if not
exists" N times,
and i is in the range of 0~N. When N is small, it is ok,some row
inserted by thread 1 and others
inserted by thread 2. but N is big, I will get
TimedoutException(acknowledged_by:1, paxos_in_progress:true) and have
two different results:

1) only one thread throw the exception, and this thread insert the value
successfully;
2) both threads throw the exception, and no value inserted into the table.

I except that some row in test_table inserted by thread 1 and others
inserted by thread 2,
when one thread insert a row has be in the table, it is just return and
don't modify the row.
I think that is lightweight transaction's function, But why I get the
exception and how to avoid it.
I try to enlarge cas_contention_timeout_in_ms in cassandra.yaml, but it
does not work.

my cassandra version is 2.0.3, and the cluster has two nodes with
keypsace's replication_factor is 2.

Best Regards
Jim Xu

Mime
View raw message