You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by MyWorld <ti...@gmail.com> on 2022/03/23 16:43:28 UTC

Removing row level tombstones

Hi all,

I have a table (with default gc_grace_seconds) where we have some row
tombstones created. Currently there are 2 sstables for this.
When we check the sstablemetadata, we found Estimated droppable tombstones:
0.689(for sstable1) and 1.094(for sstable2)
After executing nodetool compact on this table, we found that row
tombstones still exist.
Even after executing nodetool garbagecollect and compact one after another,
we were not able to delete these tombstones.

Please suggest how to remove these.

*Sample of sstabledump (for sstable 1)*
[
  {
    "partition" : {
      "key" : [ "114168" ],
      "position" : 733
    },
    "rows" : [
      {
        "type" : "row",
        "position" : 755,
        "clustering" : [ "Disposable Catheter" ],
        "deletion_info" : { "marked_deleted" : "2020-10-12T08:57:57.015Z",
"local_delete_time" : "2020-10-12T08:57:57Z" },
        "cells" : [ ]
      },
      {
        "type" : "row",
        "position" : 791,
        "clustering" : [ "Disposable Catheter Akash" ],
        "deletion_info" : { "marked_deleted" : "2020-10-12T09:01:28.927Z",
"local_delete_time" : "2020-10-12T09:01:28Z" },
        "cells" : [ ]
      },
      {
        "type" : "row",
        "position" : 869,
        "clustering" : [ "Single Use Catheter test" ],
        "liveness_info" : { "tstamp" : "2020-10-12T09:03:00.223Z" },
        "cells" : [
          { "name" : "my_id", "value" : 1 }
        ]
      }
    ]
  }
]

*Sample of sstabledump (for sstable 2)*
[
  {
    "partition" : {
      "key" : [ "114168" ],
      "position" : 544360
    },
    "rows" : [
      {
        "type" : "row",
        "position" : 544382,
        "clustering" : [ "Disposable Catheter" ],
        "deletion_info" : { "marked_deleted" : "2020-10-12T08:57:57.015Z",
"local_delete_time" : "2020-10-12T08:57:57Z" },
        "cells" : [ ]
      },
      {
        "type" : "row",
        "position" : 544418,
        "clustering" : [ "Disposable Catheter Akash" ],
        "deletion_info" : { "marked_deleted" : "2020-10-12T09:01:28.927Z",
"local_delete_time" : "2020-10-12T09:01:28Z" },
        "cells" : [ ]
      },
      {
        "type" : "row",
        "position" : 544496,
        "clustering" : [ "Single Use Catheter test" ],
        "liveness_info" : { "tstamp" : "2020-10-12T09:03:00.223Z" },
        "cells" : [
          { "name" : "my_id", "value" : 1 }
        ]
      },
      {
        "type" : "row",
        "position" : 544551,
        "clustering" : [ "Catheter" ],
        "liveness_info" : { "tstamp" : "2020-05-26T08:07:38.153026Z" },
        "cells" : [
          { "name" : "my_id", "value" : 1 }
        ]
      }
    ]
  }
]

Regards,
Ashish

Re: Removing row level tombstones

Posted by Bowen Song <bo...@bso.ng>.
Since you still have two SSTables after a major compaction, my best 
guess is one of them is repaired and the other is unrepaired. If a 
partition exists in both SSTable, and only one of them is a tombstone, 
the tombstone must be kept to avoid resurrecting the data from the other 
SSTable. To get rid of the tombstones and turn two SSTables into one, 
you will need to ensure the SSTables are either both repaired or both 
unrepaired.

On 23/03/2022 16:43, MyWorld wrote:
> Hi all,
>
> I have a table (with default gc_grace_seconds) where we have some row 
> tombstones created. Currently there are 2 sstables for this.
> When we check the sstablemetadata, we found Estimated droppable 
> tombstones: 0.689(for sstable1) and 1.094(for sstable2)
> After executing nodetool compact on this table, we found that row 
> tombstones still exist.
> Even after executing nodetool garbagecollect and compact one after 
> another, we were not able to delete these tombstones.
>
> Please suggest how to remove these.
>
> *Sample of sstabledump (for sstable 1)*
> [
>   {
>     "partition" : {
>       "key" : [ "114168" ],
>       "position" : 733
>     },
>     "rows" : [
>       {
>         "type" : "row",
>         "position" : 755,
>         "clustering" : [ "Disposable Catheter" ],
>         "deletion_info" : { "marked_deleted" : 
> "2020-10-12T08:57:57.015Z", "local_delete_time" : 
> "2020-10-12T08:57:57Z" },
>         "cells" : [ ]
>       },
>       {
>         "type" : "row",
>         "position" : 791,
>         "clustering" : [ "Disposable Catheter Akash" ],
>         "deletion_info" : { "marked_deleted" : 
> "2020-10-12T09:01:28.927Z", "local_delete_time" : 
> "2020-10-12T09:01:28Z" },
>         "cells" : [ ]
>       },
>       {
>         "type" : "row",
>         "position" : 869,
>         "clustering" : [ "Single Use Catheter test" ],
>         "liveness_info" : { "tstamp" : "2020-10-12T09:03:00.223Z" },
>         "cells" : [
>           { "name" : "my_id", "value" : 1 }
>         ]
>       }
>     ]
>   }
> ]
>
> *Sample of sstabledump (for sstable 2)*
> [
>   {
>     "partition" : {
>       "key" : [ "114168" ],
>       "position" : 544360
>     },
>     "rows" : [
>       {
>         "type" : "row",
>         "position" : 544382,
>         "clustering" : [ "Disposable Catheter" ],
>         "deletion_info" : { "marked_deleted" : 
> "2020-10-12T08:57:57.015Z", "local_delete_time" : 
> "2020-10-12T08:57:57Z" },
>         "cells" : [ ]
>       },
>       {
>         "type" : "row",
>         "position" : 544418,
>         "clustering" : [ "Disposable Catheter Akash" ],
>         "deletion_info" : { "marked_deleted" : 
> "2020-10-12T09:01:28.927Z", "local_delete_time" : 
> "2020-10-12T09:01:28Z" },
>         "cells" : [ ]
>       },
>       {
>         "type" : "row",
>         "position" : 544496,
>         "clustering" : [ "Single Use Catheter test" ],
>         "liveness_info" : { "tstamp" : "2020-10-12T09:03:00.223Z" },
>         "cells" : [
>           { "name" : "my_id", "value" : 1 }
>         ]
>       },
>       {
>         "type" : "row",
>         "position" : 544551,
>         "clustering" : [ "Catheter" ],
>         "liveness_info" : { "tstamp" : "2020-05-26T08:07:38.153026Z" },
>         "cells" : [
>           { "name" : "my_id", "value" : 1 }
>         ]
>       }
>     ]
>   }
> ]
>
> Regards,
> Ashish