cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ayub M <hia...@gmail.com>
Subject Re: Cassandra collection tombstones
Date Sun, 27 Jan 2019 09:02:13 GMT
Thanks Alain/Chris.

Firstly I am not seeing any difference when using gc_grace_seconds with
sstablemetadata.

CREATE TABLE ks.nmtest (
    reservation_id text,
    order_id text,
    c1 int,
    order_details map<text, text>,
    PRIMARY KEY (reservation_id, order_id)
) WITH CLUSTERING ORDER BY (order_id ASC)
    AND bloom_filter_fp_chance = 0.01
    AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'}
    AND comment = ''
    AND compaction = {'class':
'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy',
'max_threshold': '32', 'min_threshold': '4'}
    AND compression = {'chunk_length_in_kb': '64', 'class':
'org.apache.cassandra.io.compress.LZ4Compressor'}
    AND crc_check_chance = 1.0
    AND dclocal_read_repair_chance = 0.1
    AND default_time_to_live = 0
    AND gc_grace_seconds = 86400
    AND max_index_interval = 2048
    AND memtable_flush_period_in_ms = 0
    AND min_index_interval = 128
    AND read_repair_chance = 0.0
    AND speculative_retry = '99PERCENTILE';

[root@ip-xxx-xxx-xxx-xxx nmtest-e1302500201d11e983bb693c02c04c62]#
sstabledump mc-11-big-Data.db
WARN  08:27:32,793 memtable_cleanup_threshold has been deprecated and
should be removed from cassandra.yaml
[
  {
    "partition" : {
      "key" : [ "4" ],
      "position" : 0
    },
    "rows" : [
      {
        "type" : "row",
        "position" : 40,
        "clustering" : [ "4" ],
        "cells" : [
          { "name" : "order_details", "path" : [ "key1" ], "value" :
"value1", "tstamp" : "2019-01-27T08:26:49.633240Z" }
        ]
      }
    ]
  },
  {
    "partition" : {
      "key" : [ "5" ],
      "position" : 41
    },
    "rows" : [
      {
        "type" : "row",
        "position" : 82,
        "clustering" : [ "5" ],
        "liveness_info" : { "tstamp" : "2019-01-27T08:23:29.782506Z" },
        "cells" : [
          { "name" : "c1", "value" : 5 },
          { "name" : "order_details", "deletion_info" : { "marked_deleted"
: "2019-01-27T08:23:29.782505Z", "local_delete_time" :
"2019-01-27T08:23:29Z" } },
          { "name" : "order_details", "path" : [ "key" ], "value" : "value"
}
        ]
      }
    ]
  }

Partition 5 is a newly inserted record, no matter what gc_grace_seconds
value I pass it still shows this record as estimated tombstone.

[root@ip-xxx-xxx-xxx-xxx nmtest-e1302500201d11e983bb693c02c04c62]#
sstablemetadata mc-11-big-Data.db | grep "Estimated tombstone drop times"
-A3
Estimated tombstone drop times:
1548577440:         1
Count               Row Size        Cell Count

[root@ip-xxx-xxx-xxx-xxx nmtest-e1302500201d11e983bb693c02c04c62]#
sstablemetadata  --gc_grace_seconds 86400 mc-11-big-Data.db | grep
"Estimated tombstone drop times" -A4
Estimated tombstone drop times:
1548577440:         1
Count               Row Size        Cell Count

Second question, for this test table I see the original record which I
inserted got its tombstone removed by autocompaction which ran today as its
gc_grace_seconds is set to one day. But I see some tables whose
gc_grace_seconds is set to 3 days but when I do sstabledump on them I see
tombstone entries for them in the json output and sstablemetadata also
shows them to be estimated tombstones records. I see autocompaction is
running on the stables of this table and I also manually ran using jmx
shell but they are still there...any reason why they are not getting
deleted?

sstablemetadata  --gc_grace_seconds 259200 mc-732-big-Data.db | grep
"Estimated tombstone drop times" -A10

WARN  07:28:03,086 memtable_cleanup_threshold has been deprecated and
should be removed from cassandra.yaml

Estimated tombstone drop times:

1537475340:         7

1537476150:        14

1537476360:         7

1537476660:         7


one record from son file having old tombstone markers....

  {

    "partition" : {

      "key" : [ "2945132807" ],

      "position" : 9036596

    },

"rows" : [

      {

        "type" : "row",

        "position" : 9037781,

        "clustering" : [ "2018-08-15 00:00:00.000Z", "233359" ],

        "liveness_info" : { "tstamp" : "2018-09-26T14:52:54.255395Z" },

        "cells" : [

   .....

          { "name" : "col1", "deletion_info" : { "marked_deleted" :
"2018-09-26T14:52:54.255394Z", "local_delete_time" : "2018-09-26T14:52:54Z"
} },

          { "name" : "col1", "path" : [ "zczxc" ], "value" : "ZXczx" },

          { "name" : "col1", "path" : [ "ZXCxzc" ], "value" : "ZCzxc" },

          { "name" : "col2", "deletion_info" : { "marked_deleted" :
"2018-09-26T14:52:54.255394Z", "local_delete_time" : "2018-09-26T14:52:54Z"
} },

          { "name" : "col2", "path" : [ "zcxxc" ], "value" : false },

          { "name" : "col2", "path" : [ "hjhkjh" ], "value" : false },

          { "name" : "col2", "path" : [ "LEGACY" ], "value" : true },

          { "name" : "col2", "path" : [ "NON_SITE_SPECIFIC" ], "value" :
true },

          { "name" : "issuance_data", "deletion_info" : { "marked_deleted"
: "2018-09-26T14:52:54.255394Z", "local_delete_time" :
"2018-09-26T14:52:54Z" } },

  .....

Mime
View raw message