Question

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?

Était-ce utile?

La solution

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 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.

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

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top