CassandraのRow tombstonesについて
Row tombstoneは、パーティションの特定行の削除で生成するtombstone
before
cqlsh:sitest01> select * from test_tomb where pkey1 = 'rei' and pkey2 =1;
pkey1 | pkey2 | skey1 | v1
-------+-------+-------+---------------------
rei | 1 | 1 | Bombay
rei | 1 | 2 | Brazilian Shorthair
(2 rows)
{
"partition" : {
"key" : [ "rei", "1" ],
"position" : 290
},
"rows" : [
{
"type" : "row",
"position" : 336,
"clustering" : [ 1 ],
"liveness_info" : { "tstamp" : "2019-12-15T08:45:48.827508Z" },
"cells" : [
{ "name" : "v1", "value" : "Bombay" }
]
},
{
"type" : "row",
"position" : 336,
"clustering" : [ 2 ],
"liveness_info" : { "tstamp" : "2019-12-15T08:45:48.833270Z" },
"cells" : [
{ "name" : "v1", "value" : "Brazilian Shorthair" }
]
}
]
},
delete
cqlsh:sitest01> delete from test_tomb where pkey1 = 'rei' and pkey2 =1 and skey1 = 1;
after
cqlsh:sitest01> select * from test_tomb where pkey1 = 'rei' and pkey2 =1;
pkey1 | pkey2 | skey1 | v1
-------+-------+-------+---------------------
rei | 1 | 2 | Brazilian Shorthair
(1 rows)
{
"partition" : {
"key" : [ "rei", "1" ],
"position" : 291
},
"rows" : [
{
"type" : "row",
"position" : 332,
"clustering" : [ 1 ],
"deletion_info" : { "marked_deleted" : "2019-12-15T09:18:36.270399Z", "local_delete_time" : "2019-12-15T09:18:36Z" },
"cells" : [ ]
},
{
"type" : "row",
"position" : 332,
"clustering" : [ 2 ],
"liveness_info" : { "tstamp" : "2019-12-15T09:16:08.359657Z" },
"cells" : [
{ "name" : "v1", "value" : "Brazilian Shorthair" }
]
}
]
}
Estimated tombstone drop times:
1576401540: 1