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

INSERT with IF NOT EXISTS fails when row is an expired ttl

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Duplicate
    • None
    • None
    • None
    • Normal

    Description

      I ran this on a 2 DC cluster with 3 nodes each.

      CREATE KEYSPACE test WITH replication = {
      'class': 'NetworkTopologyStrategy',
      'DC1': '3',
      'DC2': '3'
      };

      CREATE TABLE clusterlock (
      name text,
      hostname text,
      lockid text,
      PRIMARY KEY (name)
      ) ;

      Then add some data and flush it to ensure the sstables exist (didn't reproduce in memtables for some reason).

      Then

      insert into clusterlock (name, lockid, hostname) values ( 'adam', 'tt', '111') IF NOT EXISTS USING TTL 5;

      Wait for ttl to be reached then try again:

      insert into clusterlock (name, lockid, hostname) values ( 'adam', 'tt', '111') IF NOT EXISTS USING TTL 5;

      [applied]
      -----------
      False

      select * shows no rows in table.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ahattrell Adam Hattrell
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: