gc_grace_seconds中的压缩应保留Tombstones吗? [英] Should Compaction within gc_grace_seconds Preserve Tombstones?

查看:155
本文介绍了gc_grace_seconds中的压缩应保留Tombstones吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我删除一行(创建逻辑删除),并在 gc_grace_seconds 中运行主要压缩,则希望墓碑至少可以存活直到 gc_grace_seconds

If I delete a row (creating a tombstone), and run a major compaction within gc_grace_seconds, would one expect the tombstone to survive at least until gc_grace_seconds has elapsed?

推荐答案

是的,墓碑应该能够存活gc_grace_seconds。原因是,如果一个节点在您删除该行的时间点处已关闭,则删除必须有机会稍后传播到该节点。当节点重新联机并运行 nodetool repair 时,它可以选择删除。如果您不在gc_grace_seconds内运行修复,那么您删除的记录可能会从死机中返回。

Yes, the tombstone is expected to survive for gc_grace_seconds. The reason is that if a node is down at the point in time you delete the row, the delete must have a chance to get propagated to that node later on. When the node is back online and you run nodetool repair it can pick up the delete. If you do not run the repair within gc_grace_seconds then your deleted record might return from the dead.

IFF您正在运行单节点集群,那么您可以安全地设置gc_grace_seconds因为没有其他节点可能会丢失删除。

IFF you are running a single-node cluster, then you can safely set gc_grace_seconds to 0. As there are no other nodes that might be missing deletes.

请在 Cassandra操作,修复和gc_grace_seconds。

Have a look at this page on Cassandra operations, repair, and gc_grace_seconds.

这篇关于gc_grace_seconds中的压缩应保留Tombstones吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆