Hi all,
 
I have a question about a behavior when insert a list with specifying timestamp.
 
It is documented that "An INSERT will always replace the entire list."
https://github.com/apache/cassandra/blob/trunk/doc/cql3/CQL.textile#lists
 
However, When a list is inserted multiple times using same timestamp,
it will not be replaced, but will be added as follows.
 
cqlsh> CREATE TABLE test.test (k int PRIMARY KEY , v list<int>);                
                                                                                
                                                                    
cqlsh> INSERT INTO test.test (k , v ) VALUES ( 1 ,[1]) USING TIMESTAMP 1000 ;   
                                                                                
                                                                    
cqlsh> INSERT INTO test.test (k , v ) VALUES ( 1 ,[1]) USING TIMESTAMP 1000 ;
cqlsh> SELECT * FROM test.test ;
 
 k | v
---+--------
 1 | [1, 1]
 
I confirmed this behavior is reproduced in 3.0.13 and 3.10.
I'd like to ask whether this behavior is a expected behavior or a bug?
 
In our use case, CQL statements with same values and timestamp will be issued 
multiple times
to retry inserting under the assumption that insert is idempotent.
So, I expect that the entire list will be replace even if insert a list 
multiple times with same timestamp.
 
Thanks,
 
Zhongxiang


Reply via email to