Cassandra tombstones count multiple queries vs single query

风流意气都作罢 提交于 2019-12-06 10:50:32

Cassandra will create a single tombstone for each delete statement. However, each statement will create a different type of tombstone.

1. delete from mytable where colA = '...' AND colB = '...' and timeCol = 111

Will create a row level tombstone:

{ "key": "00032e2e2e0000032e2e2e000008000000000000006f00", "metadata": { "deletionInfo": { "markedForDeleteAt":1427461335167000,"localDeletionTime":1427461335 } }, "columns": [] }

Row level tombstones will make sure all columns will be covered with the delete.

2. delete from mytable where colA = '...' AND colB = '...' and timeCol = 111 AND colC = '...'

Creates a column tombstone:

{ "key": "00032e2e2e0000032e2e2e000008000000000000006f00", "columns": [["...","...:!",1427461572135000,"t",1427461572]] }

This will only delete values that have been saved under this clustering key.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!