Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the implications of using a low GCGraceSeconds value in Cassandra?

The default setting of Cassandra for GCGraceSeconds is 10 days.

I wonder why this is defaulted that big and what the implications will be if this will be a lower number like 60 seconds.

The reason for asking is that I want to achieve a faster "cleaning" of ghost rows that pop up after their removal. I am often reading these rows with some scans and need to put some logic into the client to validate that the content is not deleted yet.

How can a lower GCGraceSeconds value effect the system and how does it compare to having this kind of ghost rows for some days?

like image 567
favo Avatar asked Feb 13 '12 22:02

favo


1 Answers

GCGraceSeconds puts an upper bound on the amount of time the cluster had to propagate tombstones. A low GC grace seconds means than if a host is not contactable for that period, and doesn't receive the tombstone, then a deleted value could "come back from the dead".

It is advised that you run repair at least every GCGraceSeconds, so you can guarantee that the tombstone have been replicated. With a very small value for this, you will not be able to run repair often enough.

like image 52
tom.wilkie Avatar answered Sep 22 '22 12:09

tom.wilkie