我在 Cassandra 中删除行键时遇到问题。每当我删除 Row Key 时,该 RowKey 包含的所有列都会被删除,但 RowKey 本身不会被删除。任何人都可以告诉我如何删除一个 rowkey,一旦它被插入到 columnfamily 中。
我期待通过 thrift 客户端做到这一点。
最佳答案
这是 Cassandra 中分布式删除工作方式的副作用。来自Cassandra wiki page on distributed deletes :
[A] delete operation can't just wipe out all traces of the data being removed immediately: if we did, and a replica did not receive the delete operation, when it becomes available again it will treat the replicas that did receive the delete as having missed a write update, and repair them! So, instead of wiping out data on delete, Cassandra replaces it with a special value called a tombstone. The tombstone can then be propagated to replicas that missed the initial remove request.
另请查看常见问题解答中的这个问题:Why do deleted keys show up during range scans?
关于cassandra - 无法删除行键,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8881273/