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

CREATE TABLE accepts value for default_time_to_live on counter table

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 2.0.13, 2.1.3
    • Legacy/Tools
    • None

    Description

      I can create a counter table (via cqlsh) with a default_time_to_live:

      CREATE TABLE IF NOT EXISTS metrics2(
      time timestamp,
      value counter,
      PRIMARY KEY ((time))
      ) WITH default_time_to_live=10;

      Upsert a row that increments the counter:

      UPDATE metrics2 SET value=value+1 WHERE timestamp='2015-01-24 10:48 -0600';

      Wait 10 seconds, and select, and the row is (of course) still there. There should probably be a warning or error preventing the creation of a table that has both counter columns and a value set for default_time_to_live.

      Attachments

        1. cass-8678-backport-2.0.diff
          5 kB
          Jeff Jirsa
        2. cass-8678-3.diff
          3 kB
          Jeff Jirsa

        Activity

          People

            jjirsa Jeff Jirsa
            aploetz Aaron Ploetz
            Jeff Jirsa
            Tom Hobbs
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: