Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-6532

Deleting and re-adding counter causes null count value.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Normal
    • Resolution: Invalid
    • None
    • None
    • cqlsh 4.1.0 | Cassandra 2.0.3 | CQL spec 3.1.1 | Thrift protocol 19.38.0

    Description

      After a specific counter has been deleted, recreating a new counter with the same key causes the value to be permanently null.

      cqlsh:demo> create table DemoCounter ( pk  text primary key, cnt counter );
      cqlsh:demo> update DemoCounter set cnt = cnt + 1 where pk = 'foo';
      cqlsh:demo> select * from DemoCounter;
      
       pk  | cnt
      -----+-----
       foo |   1
      
      (1 rows)
      
      cqlsh:demo> delete from DemoCounter where pk = 'foo';
      cqlsh:demo> select * from DemoCounter;
      
      (0 rows)
      
      cqlsh:demo> update DemoCounter set cnt = cnt + 1 where pk = 'foo';
      cqlsh:demo> select * from DemoCounter;
      
       pk  | cnt
      -----+------
       foo | null
      
      (1 rows)
      
      cqlsh:demo>
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            ramsperger Gregory Ramsperger
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: