Data from truncated Counter CF reappears after server restart
-------------------------------------------------------------

                 Key: CASSANDRA-2950
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2950
             Project: Cassandra
          Issue Type: Bug
            Reporter: Cathy Daw


* Configure 3 node cluster
* Ensure the java stress tool creates Keyspace1 with RF=3

{code}
// Run Stress Tool to generate 10 keys, 1 column
stress --operation=COUNTER_ADD --family-type=Standard --num-keys=1000 
--num-different-keys=10 --columns=1 --consistency-level=QUORUM 
--average-size-values --replication-factor=3 --nodes=node1,node1

// Verify 10 keys in CLI
use Keyspace1; 
list Counter1; 

//TRUNCATE CF in CLI
use Keyspace1;
truncate counter1;
list counter1;

// Run stress tool and verify creation of 1 key with 1 column valued @ 1000
stress --operation=COUNTER_ADD --family-type=Standard --num-keys=1000 
--num-different-keys=1 --columns=1 --consistency-level=QUORUM 
--average-size-values --replication-factor=3 --nodes=node1,node1


// Run stress tool and verify update of existing key -- Final result is 2 
columns valued at 1500, 500.
stress --operation=COUNTER_ADD --family-type=Standard --num-keys=500 
--num-different-keys=1 --columns=2 --consistency-level=QUORUM 
--average-size-values --replication-factor=3 --nodes=node1,node1

// Run stress tool and verify update of existing key -- Final result is 3 
columns valued at 2100, 1100, 600.
stress --operation=COUNTER_ADD --family-type=Standard --num-keys=600 
--num-different-keys=1 --columns=3 --consistency-level=QUORUM 
--average-size-values --replication-factor=3 --nodes=node1,node1
{code}

*Data while all three nodes are up*
{code}
[default@Keyspace1] list Counter1;
Using default limit of 100
-------------------
RowKey: 30
=> (counter=4330, value=2100)
=> (counter=4331, value=1100)
=> (counter=4332, value=600)
{code}

* Shutdown nodes 1,2,3
* Startup nodes 1,2,3
* Verify in CLI: 11 keys.  I am expecting only 1.

*Data after bouncing nodes*
{code}
[default@Keyspace1] list Counter1;
Using default limit of 100
-------------------
RowKey: 3036
=> (counter=4330, value=500597)
-------------------
RowKey: 3038
=> (counter=4330, value=500591)
-------------------
RowKey: 3039
=> (counter=4330, value=500609)
-------------------
RowKey: 3033
=> (counter=4330, value=500607)
-------------------
RowKey: 3037
=> (counter=4330, value=500601)
-------------------
RowKey: 30
=> (counter=4330, value=2708611)
=> (counter=4331, value=606482)
=> (counter=4332, value=180798)
-------------------
RowKey: 3030
=> (counter=4330, value=500616)
-------------------
RowKey: 3032
=> (counter=4330, value=500596)
-------------------
RowKey: 3031
=> (counter=4330, value=500613)
-------------------
RowKey: 3035
=> (counter=4330, value=500624)
-------------------
RowKey: 3034
=> (counter=4330, value=500618)

11 Rows Returned.
{code}





--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to