[ 
https://issues.apache.org/jira/browse/CASSANDRA-13418?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15987267#comment-15987267
 ] 

Jeff Jirsa edited comment on CASSANDRA-13418 at 4/27/17 6:56 PM:
-----------------------------------------------------------------

I think Marcus' concern is valid, but having run TWCS in production for a long 
time, I really wish we just had a dangerous-sounding option that defaulted into 
a safe state that would let append-only users ignore overlaps when they want to 
drop sstables.

Adding code to flush/split read repaired data to different sstables is a lot 
more invasive, and would require follow-up changes to TWCS (so as not to try to 
immediately recompact those sstables with the larger post-window-major large 
final sstables). We talked about doing this in 9666 (in fact, we committed to 
it as a condition of merging TWCS), and I think it's probably a perfectly 
reasonable thing to do, but it's a lot more effort than simply telling 
cassandra "this table has no deletes, we don't care about overlaps".

Maybe the right thing is to get 9779 done so we can block deletes, and then 
this is a much-less-scary option?



was (Author: jjirsa):
I think Marcus' concern is valid, but having run TWCS in production for a long 
time, I really wish we just had a dangerous-sounding option that defaulted into 
a safe state that would let append-only users ignore overlaps when they want to 
drop sstables.

Adding code to flush read repaired data to different sstables is a lot more 
invasive, and would require follow-up changes to TWCS (so as not to try to 
immediately recompact those sstables with the larger post-window-major large 
final sstables). We talked about doing this in 9666 (in fact, we committed to 
it as a condition of merging TWCS), and I think it's probably a perfectly 
reasonable thing to do, but it's a lot more effort than simply telling 
cassandra "this table has no deletes, we don't care about overlaps".

Maybe the right thing is to get 9779 done so we can block deletes, and then 
this is a much-less-scary option?


> Allow TWCS to ignore overlaps when dropping fully expired sstables
> ------------------------------------------------------------------
>
>                 Key: CASSANDRA-13418
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-13418
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Compaction
>            Reporter: Corentin Chary
>              Labels: twcs
>
> http://thelastpickle.com/blog/2016/12/08/TWCS-part1.html explains it well. If 
> you really want read-repairs you're going to have sstables blocking the 
> expiration of other fully expired SSTables because they overlap.
> You can set unchecked_tombstone_compaction = true or tombstone_threshold to a 
> very low value and that will purge the blockers of old data that should 
> already have expired, thus removing the overlaps and allowing the other 
> SSTables to expire.
> The thing is that this is rather CPU intensive and not optimal. If you have 
> time series, you might not care if all your data doesn't exactly expire at 
> the right time, or if data re-appears for some time, as long as it gets 
> deleted as soon as it can. And in this situation I believe it would be really 
> beneficial to allow users to simply ignore overlapping SSTables when looking 
> for fully expired ones.
> To the question: why would you need read-repairs ?
> - Full repairs basically take longer than the TTL of the data on my dataset, 
> so this isn't really effective.
> - Even with a 10% chances of doing a repair, we found out that this would be 
> enough to greatly reduce entropy of the most used data (and if you have 
> timeseries, you're likely to have a dashboard doing the same important 
> queries over and over again).
> - LOCAL_QUORUM is too expensive (need >3 replicas), QUORUM is too slow.
> I'll try to come up with a patch demonstrating how this would work, try it on 
> our system and report the effects.
> cc: [~adejanovski], [~rgerard] as I know you worked on similar issues already.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to