Reputation: 1538
Simple query:- I deleted data on Scylla with gc_grace_seconds 10 days. Scylla created tombstones and waiting for gc_grace_seconds expiration.
Now, I have run major compaction on 2nd day after deletion(8 days still remaining for gc_grace_seconds expiration).
1)What compaction will do? It will consider all tombstones and clear which deleted 2 days before or not?
2) I should change gc_grace_seconds=0 before running major compaction?
Please help
Thanks in Advance.
Upvotes: 1
Views: 587
Reputation: 16420
1) At least in Cassandra (no idea about scylla) it would not purge the tombstones until gc_grace_seconds has passed. Thats what the grace seconds is for - to tell the database to keep tombstones for at least that long.
2) You can if you really want to purge them. With 0 gc grace it also means hints wont be stored in Cassandra so might want to set to 1
instead unless you are Ok with decreased durability of newly written data. Would also need to make sure repairs have completed since your data was written or the data the tombstones purge may (unlikely though) be resurrected. If set only_purge_repaired_tombstones
would prevent the purging even past the gc grace if data hasnt been repaired (I would recommend setting that for what its worth)
Upvotes: 2