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

sstabledump doesn't print out tombstone information for deleted collection column

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 3.0.6, 3.6
    • Legacy/Tools
    • Normal

    Description

      Pretty trivial to reproduce.

      echo "CREATE KEYSPACE IF NOT EXISTS testks WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '1'};" | cqlsh
      echo "CREATE TABLE IF NOT EXISTS testks.testcf ( k int, c text, val0_int int, val1_set_of_int set<int>, PRIMARY KEY (k, c) );" | cqlsh
      echo "INSERT INTO testks.testcf (k, c, val0_int, val1_set_of_int) VALUES (1, 'c1', 100, {1, 2, 3, 4, 5});" | cqlsh
      echo "delete val1_set_of_int from testks.testcf where k=1 and c='c1';" | cqlsh
      echo "select * from testks.testcf;" | cqlsh
      nodetool flush testks testcf
      

      Now if you run sstabledump (even after taking the patch for CASSANDRA-11654) against the newly generated SSTable like the following:

      ~/cassandra-trunk/tools/bin/sstabledump ma-1-big-Data.db
      [
        {
          "partition" : {
            "key" : [ "1" ],
            "position" : 0
          },
          "rows" : [
            {
              "type" : "row",
              "position" : 18,
              "clustering" : [ "c1" ],
              "liveness_info" : { "tstamp" : 1461645231352208 },
              "cells" : [
                { "name" : "val0_int", "value" : "100" }
              ]
            }
          ]
        }
      ]
      

      You will see that the collection-level Deletion Info is nowhere to be found, so you will not be able to know "markedForDeleteAt" or "localDeletionTime" for this collection tombstone.

      Attachments

        1. trunk-11655v3.patch
          13 kB
          Chris Lohfink
        2. trunk-11655v2.patch
          13 kB
          Chris Lohfink
        3. CASSANDRA-11655.patch
          5 kB
          Chris Lohfink

        Issue Links

          Activity

            People

              cnlwsu Chris Lohfink
              weideng Wei Deng
              Chris Lohfink
              Yuki Morishita
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: