Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HLocks configuration should allow a definable gc_grace seconds, instead of using default 10s #636

Open
cywjackson opened this issue Oct 10, 2013 · 2 comments

Comments

@cywjackson
Copy link

The usage for hlock would result in many tombstones, based on expiry or deletion. The access on this needs to be fast, so ideally we would want to keep the tombstone size small (supposed row cache is not enabled).

Hence using a default 10 seconds for the gc_grace on the HLocks CF creation is not ideal.

There is a HLockManagerConfigurator.java defining a bunch of default config already, so we should add default gc_grace in here, and allow it to be configurable via its api.

Food for thoughts: do we need to make sure ttl <= gc_grace? Why or why not?

@cywjackson
Copy link
Author

On "Food for thoughts: do we need to make sure ttl <= gc_grace? Why or why not?"

Ok I've checked with Nick Bailey, and agreed that if data are always inserted with TTL and delete only, then setting the gc_grace = TTL is safe.

On a side note, if data are always inserted with TTL only, then gc_grace can be set at 0.

The reason we can't do this for Locks is because of the delete. Here is a scenario:

assume rf=3, R/W @ CL.Q
if node C doesn't get the delete but node A and B do, then before TTL reach, they compact and remove the tombstone (since gc_grace=0), then repair happens, node C will send the deleted data back to A and B

So at the minimum, we need to set gc_grace=ttl

@cywjackson
Copy link
Author

PR: #637

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant