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

Keyspace named "snapshots" is empty after service restart

    XMLWordPrintableJSON

Details

    Description

      I am posting this bug in hope to discover the stupid mistake I am doing because I can't imagine a reasonable answer for the behavior I see right now

      In short words, I do observe data loss in a keyspace called snapshots after restarting the Cassandra service. Say I do have 1000 records in a table called snapshots.test_idx then after restart the table has less entries or is even empty.

      My kind of "mysterious" observation is that it happens only in a keyspace called snapshots...

      Steps to reproduce

      These steps to reproduce show the described behavior in "most" attempts (not every single time though).

      # create keyspace
      CREATE KEYSPACE snapshots WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1};
      
      # create table
      CREATE TABLE snapshots.test_idx (key text, seqno bigint, primary key(key));
      
      # insert some test data
      INSERT INTO snapshots.test_idx (key,seqno) values ('key1', 1);
      ...
      INSERT INTO snapshots.test_idx (key,seqno) values ('key1000', 1000);
      
      # count entries
      SELECT count(*) FROM snapshots.test_idx;
      1000
      
      # restart service
      kill <cassandra-pid>
      cassandra -f
      
      # count entries
      SELECT count(*) FROM snapshots.test_idx;
      0
      

      I hope someone can point me to the obvious mistake I am doing

      This happened to me using both Cassandra 3.9 and 3.11.0

      Attachments

        Issue Links

          Activity

            People

              smiklosovic Stefan Miklosovic
              kongo2002 Gregor Uhlenheuer
              Stefan Miklosovic
              Paulo Motta
              Votes:
              0 Vote for this issue
              Watchers:
              14 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 - 0.5h
                  0.5h