cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laxmikant Upadhyay <laxmikant....@gmail.com>
Subject Re: Is my range read query behaving strange ?
Date Wed, 12 Jun 2019 02:58:26 GMT
Does range query ignore purgable tombstone (which crossed grace period) in
some cases?

On Tue, Jun 11, 2019, 2:56 PM Laxmikant Upadhyay <laxmikant.hcl@gmail.com>
wrote:

> In a 3 node cassandra 2.1.16 cluster where, one node has old mutation and
> two nodes have evict-able (crossed gc grace period) tombstone produced by
> TTL. A read range  query with local quorum return the old mutation as
> result. However expected result should be empty. Next time running the same
> query results no data as expected. Why this strange behaviour?
>
>
> *Steps to Reproduce :*
> Create a cassandra-2.1.16  3 node cluster. Disable hinted handoff for each
> node.
>
> #ccm node1 nodetool ring
> Datacenter: datacenter1
> ==========
> Address    Rack        Status State   Load            Owns
>  Token
>
> 3074457345618258602
> 127.0.0.1  rack1       Up     Normal  175.12 KB       100.00%
> -9223372036854775808
> 127.0.0.2  rack1       Up   Normal  177.87 KB       100.00%
> -3074457345618258603
> 127.0.0.3  rack1       Up   Normal  175.13 KB       100.00%
> 3074457345618258602
>
> #Connect to cqlsh and set CONISISTENCY LOCAL_QUORUM;
>
> cqlsh> CREATE KEYSPACE IF NOT EXISTS test WITH REPLICATION = { 'class' :
> 'NetworkTopologyStrategy', 'datacenter1' : 3 };
> cqlsh> CREATE TABLE test.table1 (key text, col text, val text,PRIMARY KEY
> ((key), col));
> cqlsh> ALTER TABLE test.table1  with GC_GRACE_SECONDS = 120;
>
> cqlsh> INSERT INTO test.table1  (key, col, val) VALUES ('key2',
> 'abc','xyz');
>
> #ccm flush
>
> #ccm node3 stop
>
> cqlsh> INSERT INTO test.table1  (key, col, val) VALUES ('key2',
> 'abc','xyz') USING TTL 60;
>
> #ccm flush
>
> #wait for 3 min so that the tombstone crosses its gc grace period.
>
> #ccm node3 start
>
> cqlsh> select * from test.table1 where token (key) > 3074457345618258602
> and token (key) < -9223372036854775808 ;
>
>  key  | col | val
> ------+-----+-----
>  key2 | abc | xyz
>
> (1 rows)
>
> #ccm flush
> -> Here read repair triggers and the old mutation moves to the one of the
> node where tombstone is present (not both the node)
>
>
> cqlsh> select * from test.vouchers where token (key) > 3074457345618258602
> and token (key) < -9223372036854775808 ;
>
>  key | col | val
> -----+-----+-----
>
> (0 rows)
>
>
> --
>
> regards,
> Laxmikant Upadhyay
>
>

Mime
View raw message