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

Multinode counters don't get updated

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 4.0-rc2, 4.0
    • Feature/Counters
    • None

    Description

      A multi node setup with counters doesn't update counters value. Works as expected on a single node though. Comes from this test. Repro:

      ccm create counters40
      ccm populate -n 2
      ccm start
      ccm node1 cqlsh
        CREATE KEYSPACE foo WITH REPLICATION = { 'class' : 'NetworkTopologyStrategy', 'datacenter1' : 1 } ;
        use foo;
        CREATE TABLE clicks ( userid int, url text, total counter, PRIMARY KEY (userid, url) ) WITH COMPACT STORAGE;
        ALTER TABLE clicks DROP COMPACT STORAGE;
        TRUNCATE clicks;
        UPDATE clicks SET total = total + 1 WHERE userid = 1 AND url = 'http://foo.com';
        SELECT total FROM clicks WHERE userid = 1 AND url = 'http://foo.com';
      
           total
          -------
               1
        UPDATE clicks SET total = total - 4 WHERE userid = 1 AND url = 'http://foo.com';
        SELECT total FROM clicks WHERE userid = 1 AND url = 'http://foo.com';
      
           total
          -------
               1 *********** Should be '-3'
      

      Attachments

        Issue Links

          Activity

            People

              adelapena Andres de la Peña
              bereng Berenguer Blasi
              Andres de la Peña
              Benjamin Lerer, Ekaterina Dimitrova
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m