Re: How do TTLs generate tombstones

2017-10-31 Thread eugene miretsky
Thanks, We have turned off read repair, and read with consistency = one. This leaves repairs and old timestamps (generate by the client) as possible causes for the overlap. We are writing from Spark, and don't have NTP set up on the cluster - I think that was causing some of the issues, but we

Re: How do TTLs generate tombstones

2017-10-11 Thread Jeff Jirsa
Anti-entropy repairs ("nodetool repair") and bootstrap/decom/removenode should stream sections of (and/or possibly entire) sstables from one replica to another. Assuming the original sstable was entirely contained in a single time window, the resulting sstable fragment streamed to the neighbor

Re: How do TTLs generate tombstones

2017-10-11 Thread Sumanth Pasupuleti
Hi Eugene, Common contributors to overlapping SSTables are 1. Hints 2. Repairs 3. New writes with old timestamps (should be rare but technically possible) I would not run repairs with TWCS - as you indicated, it is going to result in overlapping SSTables which impacts disk space and read latency

Re: How do TTLs generate tombstones

2017-10-09 Thread eugene miretsky
Thanks Alain! We are using TWCS compaction, and I read your blog multiple times - it was very useful, thanks! We are seeing a lot of overlapping SSTables, leading to a lot of problems: (a) large number of tombstones read in queries, (b) high CPU usage, (c) fairly long Young Gen GC collection

Re: How do TTLs generate tombstones

2017-10-06 Thread Alain RODRIGUEZ
Hi Eugene, If we never use updates (time series data), is it safe to set > gc_grace_seconds=0. As Kurt pointed, you never want 'gc_grace_seconds' to be lower than 'max_hint_window_in_ms' as the min off these 2 values is used for hints storage window size in Apache Cassandra. Yet time series

Re: How do TTLs generate tombstones

2017-10-05 Thread kurt greaves
No it's never safe to set it to 0 as you'll disable hinted handoff for the table. If you are never doing updates and manual deletes and you always insert with a ttl you can get away with setting it to the hinted handoff period. On 6 Oct. 2017 1:28 am, "eugene miretsky"

Re: How do TTLs generate tombstones

2017-10-05 Thread eugene miretsky
Thanks Jeff, Make sense. If we never use updates (time series data), is it safe to set gc_grace_seconds=0. On Wed, Oct 4, 2017 at 5:59 PM, Jeff Jirsa wrote: > > The TTL'd cell is treated as a tombstone. gc_grace_seconds applies to > TTL'd cells, because even though the data

Re: How do TTLs generate tombstones

2017-10-04 Thread Jeff Jirsa
The TTL'd cell is treated as a tombstone. gc_grace_seconds applies to TTL'd cells, because even though the data is TTL'd, it may have been written on top of another live cell that wasn't ttl'd: Imagine a test table, simple key->value (k, v). INSERT INTO table(k,v) values(1,1); Kill 1 of the 3

How do TTLs generate tombstones

2017-10-04 Thread eugene miretsky
Hello, The following link says that TTLs generate tombstones - https://docs.datastax.com/en/cql/3.3/cql/cql_using/useExpire.html. What exactly is the process that converts the TTL into a tombstone? 1. Is an actual new tombstone cell created when the TTL expires? 2. Or, is the TTLed cell