[ 
https://issues.apache.org/jira/browse/CASSANDRA-14881?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Laxmikant Upadhyay updated CASSANDRA-14881:
-------------------------------------------
    Attachment:     (was: CorrectCounterUpdateTrace.txt)

> Inconsistent behaviour of counter update during cassandra upgrade 2.1.16 -> 
> 3.11.2
> ----------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-14881
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-14881
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Legacy/Core
>         Environment: {code:java}
> // code placeholder
> {code}
>            Reporter: Laxmikant Upadhyay
>            Priority: Major
>
> I have 3 node (A,B,C) 2.1.16 cassandra cluster which i am upgrading to 
> cassandra 3.11.2.
>  My current cluster status is node a has been upgrade to 3.11.2, B is down, 
> and C is on cassandra 2.1.16
> when i run counter update using cqlsh it is behaving strange inconsistent way 
> , sometimes the update actually applied and sometimes it does not apply at 
> all.
> See the below example of cqlsh logged in to node A:
>  ===============Incorrect update : update not applied ========
> {code:java}
> user@cqlsh:ks> select * from "counterTable";
>  key              | column1        | value
> ------------------+----------------+-------
>  key1 | count |     0
>  
> user@cqlsh:ks> UPDATE "counterTable" SET value = value + 100 WHERE key = 
> 'key1' AND column1 = 'count';
> user@cqlsh:ks> select * from "counterTable";
>  key              | column1        | value
> ------------------+----------------+-------
>  key1 | count |     0{code}
>  ===============Correct update : update applied successfully ========
> {code:java}
> user@cqlsh> USE ks ;
> user@cqlsh:ks> select * from "counterTable";
>  key              | column1        | value
> ------------------+----------------+-------
>  key1 | count |  -100
>  
> user@cqlsh:ks> UPDATE "counterTable" SET value = value + 100 WHERE key = 
> 'key1' AND column1 = 'count';
> user@cqlsh:ks> select * from "counterTable";
>  key              | column1        | value
> ------------------+----------------+-------
>  key1 | count |     0{code}
> I have attached the output with trace enabled (with actual timestamp) for 
> both correct and incorrect counter update .
> What is the reason of this weird behavior ?
> Below is my table details:
> {code:java}
> CREATE TABLE ks."counterTable" (
>     key text,
>     column1 text,
>     value counter,
>     PRIMARY KEY (key, column1)
> ) WITH COMPACT STORAGE
>     AND CLUSTERING ORDER BY (column1 ASC)
>     AND bloom_filter_fp_chance = 0.01
>     AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'}
>     AND comment = ''
>     AND compaction = {'class': 
> 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 
> 'max_threshold': '32', 'min_threshold': '4'}
>     AND compression = {'chunk_length_in_kb': '64', 'class': 
> 'org.apache.cassandra.io.compress.LZ4Compressor'}
>     AND crc_check_chance = 1.0
>     AND dclocal_read_repair_chance = 0.1
>     AND default_time_to_live = 0
>     AND gc_grace_seconds = 864000
>     AND max_index_interval = 2048
>     AND memtable_flush_period_in_ms = 0
>     AND min_index_interval = 128
>     AND read_repair_chance = 0.0
>     AND speculative_retry = '99PERCENTILE';{code}
> *Note :* When all nodes are successfully upgraded OR when 2 nodes gets 
> upgraded to 3.11.2 and 3rd non-upgraded node is down then we don't see such 
> issue . couner update works as expected



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to