CassandraのCell tombstonesについて
Cell 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 v1 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 | 1 | null
rei | 1 | 2 | Brazilian Shorthair
(2 rows)
{
"partition" : {
"key" : [ "rei", "1" ],
"position" : 290
},
"rows" : [
{
"type" : "row",
"position" : 335,
"clustering" : [ 1 ],
"liveness_info" : { "tstamp" : "2019-12-15T08:45:48.827508Z" },
"cells" : [
{ "name" : "v1", "deletion_info" : { "local_delete_time" : "2019-12-15T09:04:53Z" },
"tstamp" : "2019-12-15T09:04:53.756348Z"
}
]
},
{
"type" : "row",
"position" : 335,
"clustering" : [ 2 ],
"liveness_info" : { "tstamp" : "2019-12-15T08:45:48.833270Z" },
"cells" : [
{ "name" : "v1", "value" : "Brazilian Shorthair" }
]
}
]
}
Estimated tombstone drop times:
1576400700: 1