SlideShare a Scribd company logo
Licensed under a Creative Commons Attribution-NonCommercial 3.0 New Zealand License
HOW CASSANDRA DELETES DATA
Alain Rodriguez
• Tombstone issues
• Why tombstones
• Tombstone removal
Introduction
About The Last Pickle
About The Last Pickle and Alain Rodriguez
About The Last Pickle and Alain Rodriguez
About deletes in Cassandra
Deleted data in Cassandra do not just disappear,
Deleted data in Cassandra do not just disappear,
instead a tombstone is added.
About deletes in Cassandra
Ok so what’s the matter, why this talk ?
Tombstone are needed in Cassandra, not an issue…
Ok so what’s the matter, why this talk ?
Tombstone are needed in Cassandra, not an issue…
…until an SSTables or a result to a query look like this…
Then we can see that in the user
mailing list or other community tools
Ok so what’s the matter, why this talk ?
Then we can see that in the user
mailing list or other community tools
So I thought I could share,
about this topic.
thelastpickle.com/blog/2016/07/27/about-deletes-and-tombstones.html
Ok so what’s the matter, why this talk ?
Tombstone issues
Tombstone issues: impacts
The read path: Reading tombstones induces
Latencies, Timeouts or Exceptions
Tombstone issues: impacts
The read path: Reading tombstones induces
Latencies, Timeouts or Exceptions
The disk space: tombstones can fill up the disk
100%
Tombstone issues: impacts
The read path: Reading tombstones induces
Latencies, Timeouts or Exceptions
The disk space: tombstones can fill up the disk
I am facing one of these issues, is it caused by tombstones?
100%
Tombstone issues: Read Path
grep -i -e "ERROR" -e "WARN" /var/log/cassandra/system.log
Tombstone issues: Read Path
grep -i -e "ERROR" -e "WARN" /var/log/cassandra/system.log
WARN [SharedPool-Worker-7] 2016-07-16 16:31:09,048 SliceQueryFilter.java:319 - Read 276 live and 1104 tombstone
cells in mykeyspace.mytable for key: ItV9kZC8mFNiSvYM8AwufBU8tTtJkW5dUH5MNcq1H18 (see
tombstone_warn_threshold). 500 columns were requested, slices=[-]
Tombstone issues: Read Path
grep -i -e "ERROR" -e "WARN" /var/log/cassandra/system.log
WARN [SharedPool-Worker-7] 2016-07-16 16:31:09,048 SliceQueryFilter.java:319 - Read 276 live and 1104 tombstone
cells in mykeyspace.mytable for key: ItV9kZC8mFNiSvYM8AwufBU8tTtJkW5dUH5MNcq1H18 (see
tombstone_warn_threshold). 500 columns were requested, slices=[-]
ERROR [ReadStage:290729] 2016-07-16 17:00:18,708 SliceQueryFilter.java (line 206) Scanned over 100000
tombstones in mykeyspace.mytable; query aborted (see tombstone_failure_threshold)
ERROR [ReadStage:290729] 2016-04-22 17:00:18,709 CassandraDaemon.java (line 258) Exception in threadThread[ReadStage:290729,5,main]
java.lang.RuntimeException: org.apache.cassandra.db.filter.TombstoneOverwhelmingException
Tombstone issues: Read Path
tombstoneScannedHistogram metric
Through nodetool cfstats, JMX…
Tombstone issues: Read Path
tombstoneScannedHistogram metric
Through or a plugged monitoring tool such as
Datadog, Grafana, SPM, OpsCenter…
Commercial
Free
Tombstone issues: Disk space
DroppableTombstoneRatio metric provide interesting info.
Tombstone issues: Disk space
DroppableTombstoneRatio metric provide interesting info.
Through sstablemetadata tool, JMX and plugged monitoring tool such as Datadog,
Grafana, SPM, OpsCenter, etc.
Possible to write a script to check biggest SSTables ratio for example
Why tombstones?
I want to remove data !
WhyTombstones: Cassandra write path
Write path
Client write
Memory
Disk
Memtable
Commit Log SSTable SSTable
SSTable SSTable
Cassandra node
Flush
Immutable
WhyTombstones: Cassandra write path
Write path
Client write
Memory
Disk
Memtable
Commit Log SSTable SSTable
SSTable SSTable
Cassandra node
Immutable
Client read
Flush
WhyTombstones: Distributed system
Cassandra is a distributed system
Distributed deletes are tricky !
WhyTombstones: Cassandra consistency
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
Strong

Consistency
WhyTombstones: Cassandra consistency
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
Strong

Consistency
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
?
?
?
Client write “A”
Strong

Consistency
WhyTombstones: Cassandra consistency
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
Strong

Consistency
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
?
?
?
Client write “A”
Strong

Consistency
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
?
Client write “A”
Ack
Ack
Strong

Consistency
WhyTombstones: Cassandra consistency
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
Strong

Consistency
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
?
?
?
Client write “A”
Strong

Consistency
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
?
Client write “A”
Ack
Ack
Strong

Consistency
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
?
Client write “A”
Client read “A ”
Ack
Ack
Strong

Consistency
WhyTombstones: Cassandra consistency & availability
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
Strong

Consistency
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
?
?
?
Client write “A”
Strong

Consistency
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
?
Client write “A”
Ack
Ack
Strong

Consistency
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
?
Client write “A”
Client read “A ”
Ack
Ack
Strong

Consistency
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
Down
Client write “A”
Client read “A”
Ack
Ack
High

availability
WhyTombstones: Distributed deletes
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
Strong

Consistency
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
?
?
?
Client write “A”
Strong

Consistency
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
?
Client write “A”
Ack
Ack
Strong

Consistency
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
?
Client write “A”
Client read “A ”
Ack
Ack
Strong

Consistency
WITHOUT Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
A
WhyTombstones: Distributed deletes
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
Strong

Consistency
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
?
?
?
Client write “A”
Strong

Consistency
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
?
Client write “A”
Ack
Ack
Strong

Consistency
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
?
Client write “A”
Client read “A ”
Ack
Ack
Strong

Consistency
WITHOUT Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
A
WITHOUT Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
A
Client delete “A”
WhyTombstones: Distributed deletes
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
Strong

Consistency
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
?
?
?
Client write “A”
Strong

Consistency
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
?
Client write “A”
Ack
Ack
Strong

Consistency
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
?
Client write “A”
Client read “A ”
Ack
Ack
Strong

Consistency
WITHOUT Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
A
WITHOUT Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
A
Client delete “A”
WITHOUT Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
Client delete “A”
Ack
Ack
WhyTombstones: Distributed deletes
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
Strong

Consistency
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
?
?
?
Client write “A”
Strong

Consistency
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
?
Client write “A”
Ack
Ack
Strong

Consistency
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
?
Client write “A”
Client read “A ”
Ack
Ack
Strong

Consistency
WITHOUT Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
A
WITHOUT Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
A
Client delete “A”
WITHOUT Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
Client delete “A”
Ack
Ack
WITHOUT Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
Client delete “A”
Client read “A”
Ack
Ack
Wrong
WhyTombstones: Distributed deletes
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
Strong

Consistency
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
?
?
?
Client write “A”
Strong

Consistency
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
?
Client write “A”
Ack
Ack
Strong

Consistency
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
?
Client write “A”
Client read “A ”
Ack
Ack
Strong

Consistency
WITHOUT Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
A
WITHOUT Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
A
Client delete “A”
WITHOUT Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
Client delete “A”
Ack
Ack
WITHOUT Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
Client delete “A”
Client read
“empty”
Ack
Ack
Correct
WhyTombstones: Distributed deletes
WITH Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
A
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
Strong

Consistency
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
?
?
?
Client write “A”
Strong

Consistency
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
?
Client write “A”
Ack
Ack
Strong

Consistency
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
?
Client write “A”
Client read “A ”
Ack
Ack
Strong

Consistency
WITHOUT Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
A
WITHOUT Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
A
Client delete “A”
WITHOUT Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
Client delete “A”
Ack
Ack
WITHOUT Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
Client delete “A”
Client read “A”
Ack
Ack
Wrong
WhyTombstones: Distributed deletes
WITH Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
A
WITH Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
A
Client delete “A”
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
Strong

Consistency
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
?
?
?
Client write “A”
Strong

Consistency
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
?
Client write “A”
Ack
Ack
Strong

Consistency
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
?
Client write “A”
Client read “A ”
Ack
Ack
Strong

Consistency
WITHOUT Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
A
WITHOUT Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
A
Client delete “A”
WITHOUT Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
Client delete “A”
Ack
Ack
WITHOUT Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
Client delete “A”
Client read “A”
Ack
Ack
Wrong
WhyTombstones: Distributed deletes
WITH Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
A
WITH Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2

A* =Tombstone on A
A
A
A
Client delete “A”
WITH Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2

A* =Tombstone on A
A*
A*
A
Client delete “A”
Ack
Ack
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
Strong

Consistency
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
?
?
?
Client write “A”
Strong

Consistency
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
?
Client write “A”
Ack
Ack
Strong

Consistency
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
?
Client write “A”
Client read “A ”
Ack
Ack
Strong

Consistency
WITHOUT Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
A
WITHOUT Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
A
Client delete “A”
WITHOUT Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
Client delete “A”
Ack
Ack
WITHOUT Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
Client delete “A”
Client read “A”
Ack
Ack
Wrong
WhyTombstones: Distributed deletes
WITH Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
A
WITH Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2

A* =Tombstone on A
A
A
A
Client delete “A”
WITH Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2

A* =Tombstone on A
A*
A*
A
Client delete “A”
Ack
Ack
WITH Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A* =Tombstone on A
A*
A*
A
Client delete “A”
Client read “A*”

meaning “empty”
Ack
Ack
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
Strong

Consistency
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
?
?
?
Client write “A”
Strong

Consistency
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
?
Client write “A”
Ack
Ack
Strong

Consistency
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
?
Client write “A”
Client read “A ”
Ack
Ack
Strong

Consistency
WITHOUT Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
A
WITHOUT Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
A
Client delete “A”
WITHOUT Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
Client delete “A”
Ack
Ack
WITHOUT Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
Client delete “A”
Client read “A”
Ack
Ack
Wrong Correct
Cool story, but I really want to remove the data !
Tombstone removal!
When are tombstones removed?
When should tombstones be removed?
• Once the tombstone is fully replicated
• When deleted data has been removed
When are tombstones removed?
When should tombstones be removed?
• Once the tombstone is fully replicated
• When deleted data has been removed
When are tombstones actually removed?
• After gc_grace_seconds
• During compactions

IF all the deleted data and the tombstone itself are involved
How tombstones are removed: Compaction!
Write path
Client write
Memory
Disk
Memtable
Commit Log SSTable SSTable
SSTable SSTable
Cassandra node
Immutable
Client read
Flush
How tombstones are removed: Compaction!
Write path
Client write
Memory
Disk
Memtable
Commit Log SSTable SSTable
SSTable SSTable
Cassandra node
Immutable
Client read
Compacting 4 SSTables
Flush
How tombstones are removed: Compaction!
Write path
Client write
Memory
Disk
Memtable
Commit Log
SSTable
Cassandra node
Immutable
Client read
Flush
Implications in the real world
• No compaction = no eviction
• + TTLs or deletes, tombstone stack (up to 100%)
Implications in the real world
• No compaction = no eviction
• + TTLs or deletes, tombstone stack (up to 100%)
• Overlapping SSTable = no eviction
• Fragmented data = eviction unlikely
• LCS: tombstone level ≠ than data level = no eviction
Implications in the real world
• No compaction = no eviction
• + TTLs or deletes, tombstone stack (up to 100%)
• Overlapping SSTable = no eviction
• Fragmented data = eviction unlikely
• LCS: tombstone level ≠ than data level = no eviction
• TTL << gc_grace_seconds = high % of useless data
Some tuning !
Good news:
Cassandra community
and
Committers are Awesome!
Some tuning !
Issue: No compaction = No eviction
CASSANDRA-3442: tombstone_threshold (C* 1.2.b1)
Compaction option, default:
tombstone_threshold = 0.2 (ratio = 20% has been deleted)
Single SSTable compaction triggered based on an estimate!
Low risk: worst case —> No-op
Some tuning !
Issue: Tombstone compaction loop!
CASSANDRA-4022: Check for key overlaps (C* 1.2.b1)
Internals improvement, not an option:
Estimated droppable tombstone improved
Now considering key overlapping with other SSTable
Some tuning !
Issue: Tombstone compaction loop!
CASSANDRA-4781: tombstone_compaction_interval (C* 1.2.b2)
Compaction option, default:
tombstone_compaction_interval = 86400 (in seconds = 1 day)
Definitely prevents loops
Some tuning !
Issue: Compacting to remove tombstone is expensive
CASSANDRA-5228: Expired SSTables (C*2.0.b1)
Internals improvement, not an option
Effective with Time series, DTCS / TWCS and TTLs !
Some tuning !
Issue: Tombstone compactions not triggering
CASSANDRA-6563: unchecked_tombstone_compaction (C* 2.0.9)
Compaction option, default:
unchecked_tombstone_compaction = false
CASSANDRA-4022 becomes an option
Some tuning !
Issue: Overlapping preventing efficient tombstone compactions
CASSANDRA-7019: provide_overlapping_tombstones (C* 3.10)
Compaction option, default:
provide_overlapping_tombstones = NONE (CELL / ROW / NONE)
Risky:
• Not yet released, so not really tested
• Heavier tombstones compactions
Some tuning -Tombstone distribution !
WITH Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
A
WITH Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2

A* =Tombstone on A
A
A
A
Client delete “A”
WITH Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2

A* =Tombstone on A
A*
A*
A
Client delete “A”
Ack
Ack
WITH Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A* =Tombstone on A
A*
A*
A
Client delete “A”
Client read “A*”

meaning “empty”
Ack
Ack
Correct
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
Strong

Consistency
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
?
?
?
Client write “A”
Strong

Consistency
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
?
Client write “A”
Ack
Ack
Strong

Consistency
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
?
Client write “A”
Client read “A ”
Ack
Ack
Strong

Consistency
WITHOUT Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
A
WITHOUT Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
A
Client delete “A”
WITHOUT Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
Client delete “A”
Ack
Ack
Tombstones not replicated

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A* =Tombstone on A
A*
A*
A
Client delete “A”
Client read “A*”
Ack
Ack
Correct
Some tuning -Tombstone distribution !
Case were node fail + no repair
=
Case without tombstone
WITH Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
A
WITH Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2

A* =Tombstone on A
A
A
A
Client delete “A”
WITH Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2

A* =Tombstone on A
A*
A*
A
Client delete “A”
Ack
Ack
WITH Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A* =Tombstone on A
A*
A*
A
Client delete “A”
Client read “A*”

meaning “empty”
Ack
Ack
Correct
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
Strong

Consistency
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
?
?
?
Client write “A”
Strong

Consistency
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
?
Client write “A”
Ack
Ack
Strong

Consistency
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
?
Client write “A”
Client read “A ”
Ack
Ack
Strong

Consistency
WITHOUT Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
A
WITHOUT Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
A
Client delete “A”
WITHOUT Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
Client delete “A”
Ack
Ack
Tombstones not replicated

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A* =Tombstone on A
A*
AClient read “A”
Wrong
A* removed
Some tuning -Tombstone distribution !
Case were node fail + no repair
=
Case without tombstone
=
Zombie data !
WITH Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
A
WITH Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2

A* =Tombstone on A
A
A
A
Client delete “A”
WITH Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2

A* =Tombstone on A
A*
A*
A
Client delete “A”
Ack
Ack
WITH Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A* =Tombstone on A
A*
A*
A
Client delete “A”
Client read “A*”

meaning “empty”
Ack
Ack
Correct
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
Strong

Consistency
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
?
?
?
Client write “A”
Strong

Consistency
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
?
Client write “A”
Ack
Ack
Strong

Consistency
Consistency

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
?
Client write “A”
Client read “A ”
Ack
Ack
Strong

Consistency
WITHOUT Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
A
WITHOUT Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
A
Client delete “A”
WITHOUT Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
Client delete “A”
Ack
Ack
Tombstones not replicated

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A* =Tombstone on A
AClient read “A”
Wrong
A* removed
Some tuning -Tombstone distribution !
CASSANDRA-6434 (C*3.0.b1):
only_purge_repaired_tombstones
(Default: False)
WITH Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
A
WITH Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2

A* =Tombstone on A
A
A
A
Client delete “A”
WITH Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2

A* =Tombstone on A
A*
A*
A
Client delete “A”
Ack
Ack
Tombstones not replicated

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A* =Tombstone on A
A*
A*
A
A* not removed
Client read “A*”

meaning “empty” Correct
Some tuning -Tombstone distribution !
CASSANDRA-6434 (C*3.0.b1):
only_purge_repaired_tombstones
(Default: False)
Limitation
Repair failing or no repair
=
permanent tombstone
WITH Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A
A
A
WITH Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2

A* =Tombstone on A
A
A
A
Client delete “A”
WITH Tombstones

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2

A* =Tombstone on A
A*
A*
A
Client delete “A”
Ack
Ack
Tombstones not replicated

Cassandra Cluster

4 nodes

RF = 3

Write CL = Quorum = 2
Read CL = Quorum = 2
A* =Tombstone on A
A*
A*
A
A* not removed
Client read “A*”

meaning “empty” Correct
Conclusion
Things we know about tombstones
• Tombstones due to deletes and TTLs
• Tombstone fits with Cassandra write path
• Tombstones ensure consistency
• Reading tombstones is expensive and can produce failures
• Tombstones take space on disk and might be tricky to remove
• Tombstones need to be distributed before being removed
Takeaways
• Model data and workflow to avoid to reading many tombstones
• Deleted data = repair table within gc_grace_seconds
• Monitor tombstones, keep control! (Set some alerts ?)
• Use compaction options to tackle problems, there is always a way.
• Is there no way? Ask, or create a Jira and keep improving Cassandra!
Thank you
Questions ?
thelastpickle.com/blog/2016/07/27/about-deletes-and-tombstones.html

More Related Content

Viewers also liked

Cassandra Tuning - Above and Beyond (Matija Gobec, SmartCat) | Cassandra Summ...
Cassandra Tuning - Above and Beyond (Matija Gobec, SmartCat) | Cassandra Summ...Cassandra Tuning - Above and Beyond (Matija Gobec, SmartCat) | Cassandra Summ...
Cassandra Tuning - Above and Beyond (Matija Gobec, SmartCat) | Cassandra Summ...
DataStax
 
Cassandra Troubleshooting 3.0
Cassandra Troubleshooting 3.0Cassandra Troubleshooting 3.0
Cassandra Troubleshooting 3.0
J.B. Langston
 
Lessons Learned on Java Tuning for Our Cassandra Clusters (Carlos Monroy, Kne...
Lessons Learned on Java Tuning for Our Cassandra Clusters (Carlos Monroy, Kne...Lessons Learned on Java Tuning for Our Cassandra Clusters (Carlos Monroy, Kne...
Lessons Learned on Java Tuning for Our Cassandra Clusters (Carlos Monroy, Kne...
DataStax
 
Webinar: Transforming Customer Experience Through an Always-On Data Platform
Webinar: Transforming Customer Experience Through an Always-On Data PlatformWebinar: Transforming Customer Experience Through an Always-On Data Platform
Webinar: Transforming Customer Experience Through an Always-On Data Platform
DataStax
 
Building Highly Available Apps on Cassandra (Robbie Strickland, Weather Compa...
Building Highly Available Apps on Cassandra (Robbie Strickland, Weather Compa...Building Highly Available Apps on Cassandra (Robbie Strickland, Weather Compa...
Building Highly Available Apps on Cassandra (Robbie Strickland, Weather Compa...
DataStax
 
Cassandra Exports as a Trivially Parallelizable Problem (Emilio Del Tessandor...
Cassandra Exports as a Trivially Parallelizable Problem (Emilio Del Tessandor...Cassandra Exports as a Trivially Parallelizable Problem (Emilio Del Tessandor...
Cassandra Exports as a Trivially Parallelizable Problem (Emilio Del Tessandor...
DataStax
 
Cassandra Summit 2014: Lesser Known Features of Cassandra 2.1
Cassandra Summit 2014: Lesser Known Features of Cassandra 2.1Cassandra Summit 2014: Lesser Known Features of Cassandra 2.1
Cassandra Summit 2014: Lesser Known Features of Cassandra 2.1
DataStax Academy
 
ETL With Cassandra Streaming Bulk Loading
ETL With Cassandra Streaming Bulk LoadingETL With Cassandra Streaming Bulk Loading
ETL With Cassandra Streaming Bulk Loadingalex_araujo
 
Escalabilidade Linear com o Banco de Dados NoSQL Apache Cassandra.
Escalabilidade Linear com o Banco de Dados NoSQL Apache Cassandra.Escalabilidade Linear com o Banco de Dados NoSQL Apache Cassandra.
Escalabilidade Linear com o Banco de Dados NoSQL Apache Cassandra.
Ambiente Livre
 
Large partition in Cassandra
Large partition in CassandraLarge partition in Cassandra
Large partition in Cassandra
Shogo Hoshii
 
Webinar: Diagnosing Apache Cassandra Problems in Production
Webinar: Diagnosing Apache Cassandra Problems in ProductionWebinar: Diagnosing Apache Cassandra Problems in Production
Webinar: Diagnosing Apache Cassandra Problems in Production
DataStax Academy
 
Cassandra Summit 2016 注目セッション報告
Cassandra Summit 2016 注目セッション報告Cassandra Summit 2016 注目セッション報告
Cassandra Summit 2016 注目セッション報告
Yahoo!デベロッパーネットワーク
 
Building a Fast, Resilient Time Series Store with Cassandra (Alex Petrov, Dat...
Building a Fast, Resilient Time Series Store with Cassandra (Alex Petrov, Dat...Building a Fast, Resilient Time Series Store with Cassandra (Alex Petrov, Dat...
Building a Fast, Resilient Time Series Store with Cassandra (Alex Petrov, Dat...
DataStax
 
Bucket your partitions wisely - Cassandra summit 2016
Bucket your partitions wisely - Cassandra summit 2016Bucket your partitions wisely - Cassandra summit 2016
Bucket your partitions wisely - Cassandra summit 2016
Markus Höfer
 
Managing Cassandra at Scale by Al Tobey
Managing Cassandra at Scale by Al TobeyManaging Cassandra at Scale by Al Tobey
Managing Cassandra at Scale by Al Tobey
DataStax Academy
 
On heap cache vs off-heap cache
On heap cache vs off-heap cacheOn heap cache vs off-heap cache
On heap cache vs off-heap cache
rgrebski
 
Myths of Big Partitions (Robert Stupp, DataStax) | Cassandra Summit 2016
Myths of Big Partitions (Robert Stupp, DataStax) | Cassandra Summit 2016Myths of Big Partitions (Robert Stupp, DataStax) | Cassandra Summit 2016
Myths of Big Partitions (Robert Stupp, DataStax) | Cassandra Summit 2016
DataStax
 
Cassandra Summit 2010 Performance Tuning
Cassandra Summit 2010 Performance TuningCassandra Summit 2010 Performance Tuning
Cassandra Summit 2010 Performance Tuningdriftx
 
Cassandra overview: Um Caso Prático
Cassandra overview:  Um Caso PráticoCassandra overview:  Um Caso Prático
Cassandra overview: Um Caso Prático
Eiti Kimura
 
Side by Side with Elasticsearch and Solr
Side by Side with Elasticsearch and SolrSide by Side with Elasticsearch and Solr
Side by Side with Elasticsearch and Solr
Sematext Group, Inc.
 

Viewers also liked (20)

Cassandra Tuning - Above and Beyond (Matija Gobec, SmartCat) | Cassandra Summ...
Cassandra Tuning - Above and Beyond (Matija Gobec, SmartCat) | Cassandra Summ...Cassandra Tuning - Above and Beyond (Matija Gobec, SmartCat) | Cassandra Summ...
Cassandra Tuning - Above and Beyond (Matija Gobec, SmartCat) | Cassandra Summ...
 
Cassandra Troubleshooting 3.0
Cassandra Troubleshooting 3.0Cassandra Troubleshooting 3.0
Cassandra Troubleshooting 3.0
 
Lessons Learned on Java Tuning for Our Cassandra Clusters (Carlos Monroy, Kne...
Lessons Learned on Java Tuning for Our Cassandra Clusters (Carlos Monroy, Kne...Lessons Learned on Java Tuning for Our Cassandra Clusters (Carlos Monroy, Kne...
Lessons Learned on Java Tuning for Our Cassandra Clusters (Carlos Monroy, Kne...
 
Webinar: Transforming Customer Experience Through an Always-On Data Platform
Webinar: Transforming Customer Experience Through an Always-On Data PlatformWebinar: Transforming Customer Experience Through an Always-On Data Platform
Webinar: Transforming Customer Experience Through an Always-On Data Platform
 
Building Highly Available Apps on Cassandra (Robbie Strickland, Weather Compa...
Building Highly Available Apps on Cassandra (Robbie Strickland, Weather Compa...Building Highly Available Apps on Cassandra (Robbie Strickland, Weather Compa...
Building Highly Available Apps on Cassandra (Robbie Strickland, Weather Compa...
 
Cassandra Exports as a Trivially Parallelizable Problem (Emilio Del Tessandor...
Cassandra Exports as a Trivially Parallelizable Problem (Emilio Del Tessandor...Cassandra Exports as a Trivially Parallelizable Problem (Emilio Del Tessandor...
Cassandra Exports as a Trivially Parallelizable Problem (Emilio Del Tessandor...
 
Cassandra Summit 2014: Lesser Known Features of Cassandra 2.1
Cassandra Summit 2014: Lesser Known Features of Cassandra 2.1Cassandra Summit 2014: Lesser Known Features of Cassandra 2.1
Cassandra Summit 2014: Lesser Known Features of Cassandra 2.1
 
ETL With Cassandra Streaming Bulk Loading
ETL With Cassandra Streaming Bulk LoadingETL With Cassandra Streaming Bulk Loading
ETL With Cassandra Streaming Bulk Loading
 
Escalabilidade Linear com o Banco de Dados NoSQL Apache Cassandra.
Escalabilidade Linear com o Banco de Dados NoSQL Apache Cassandra.Escalabilidade Linear com o Banco de Dados NoSQL Apache Cassandra.
Escalabilidade Linear com o Banco de Dados NoSQL Apache Cassandra.
 
Large partition in Cassandra
Large partition in CassandraLarge partition in Cassandra
Large partition in Cassandra
 
Webinar: Diagnosing Apache Cassandra Problems in Production
Webinar: Diagnosing Apache Cassandra Problems in ProductionWebinar: Diagnosing Apache Cassandra Problems in Production
Webinar: Diagnosing Apache Cassandra Problems in Production
 
Cassandra Summit 2016 注目セッション報告
Cassandra Summit 2016 注目セッション報告Cassandra Summit 2016 注目セッション報告
Cassandra Summit 2016 注目セッション報告
 
Building a Fast, Resilient Time Series Store with Cassandra (Alex Petrov, Dat...
Building a Fast, Resilient Time Series Store with Cassandra (Alex Petrov, Dat...Building a Fast, Resilient Time Series Store with Cassandra (Alex Petrov, Dat...
Building a Fast, Resilient Time Series Store with Cassandra (Alex Petrov, Dat...
 
Bucket your partitions wisely - Cassandra summit 2016
Bucket your partitions wisely - Cassandra summit 2016Bucket your partitions wisely - Cassandra summit 2016
Bucket your partitions wisely - Cassandra summit 2016
 
Managing Cassandra at Scale by Al Tobey
Managing Cassandra at Scale by Al TobeyManaging Cassandra at Scale by Al Tobey
Managing Cassandra at Scale by Al Tobey
 
On heap cache vs off-heap cache
On heap cache vs off-heap cacheOn heap cache vs off-heap cache
On heap cache vs off-heap cache
 
Myths of Big Partitions (Robert Stupp, DataStax) | Cassandra Summit 2016
Myths of Big Partitions (Robert Stupp, DataStax) | Cassandra Summit 2016Myths of Big Partitions (Robert Stupp, DataStax) | Cassandra Summit 2016
Myths of Big Partitions (Robert Stupp, DataStax) | Cassandra Summit 2016
 
Cassandra Summit 2010 Performance Tuning
Cassandra Summit 2010 Performance TuningCassandra Summit 2010 Performance Tuning
Cassandra Summit 2010 Performance Tuning
 
Cassandra overview: Um Caso Prático
Cassandra overview:  Um Caso PráticoCassandra overview:  Um Caso Prático
Cassandra overview: Um Caso Prático
 
Side by Side with Elasticsearch and Solr
Side by Side with Elasticsearch and SolrSide by Side with Elasticsearch and Solr
Side by Side with Elasticsearch and Solr
 

Similar to How Cassandra Deletes Data (Alain Rodriguez, The Last Pickle) | Cassandra Summit 2016

Spotify: Automating Cassandra repairs
Spotify: Automating Cassandra repairsSpotify: Automating Cassandra repairs
Spotify: Automating Cassandra repairs
DataStax Academy
 
Introduction to Apache Cassandra
Introduction to Apache CassandraIntroduction to Apache Cassandra
Introduction to Apache Cassandra
Luke Tillman
 
Cassandra SF Meetup - CQL Performance With Apache Cassandra 3.X
Cassandra SF Meetup - CQL Performance With Apache Cassandra 3.XCassandra SF Meetup - CQL Performance With Apache Cassandra 3.X
Cassandra SF Meetup - CQL Performance With Apache Cassandra 3.X
aaronmorton
 
Spark Cassandra Connector Dataframes
Spark Cassandra Connector DataframesSpark Cassandra Connector Dataframes
Spark Cassandra Connector Dataframes
Russell Spitzer
 
Cassandra Fundamentals - C* 2.0
Cassandra Fundamentals - C* 2.0Cassandra Fundamentals - C* 2.0
Cassandra Fundamentals - C* 2.0
Russell Spitzer
 
Querying federations 
of Triple Pattern Fragments
Querying federations 
of Triple Pattern FragmentsQuerying federations 
of Triple Pattern Fragments
Querying federations 
of Triple Pattern Fragments
Ruben Verborgh
 
Atmosphere Conference 2015: Need for Async: In pursuit of scalable internet-s...
Atmosphere Conference 2015: Need for Async: In pursuit of scalable internet-s...Atmosphere Conference 2015: Need for Async: In pursuit of scalable internet-s...
Atmosphere Conference 2015: Need for Async: In pursuit of scalable internet-s...
PROIDEA
 
Akka Cluster in Production
Akka Cluster in ProductionAkka Cluster in Production
Akka Cluster in Production
bilyushonak
 
Introduction to Cassandra
Introduction to CassandraIntroduction to Cassandra
Introduction to Cassandra
Hanborq Inc.
 
Kick-R: Get your own R instance with 36 cores on AWS
Kick-R: Get your own R instance with 36 cores on AWSKick-R: Get your own R instance with 36 cores on AWS
Kick-R: Get your own R instance with 36 cores on AWS
Kiwamu Okabe
 

Similar to How Cassandra Deletes Data (Alain Rodriguez, The Last Pickle) | Cassandra Summit 2016 (10)

Spotify: Automating Cassandra repairs
Spotify: Automating Cassandra repairsSpotify: Automating Cassandra repairs
Spotify: Automating Cassandra repairs
 
Introduction to Apache Cassandra
Introduction to Apache CassandraIntroduction to Apache Cassandra
Introduction to Apache Cassandra
 
Cassandra SF Meetup - CQL Performance With Apache Cassandra 3.X
Cassandra SF Meetup - CQL Performance With Apache Cassandra 3.XCassandra SF Meetup - CQL Performance With Apache Cassandra 3.X
Cassandra SF Meetup - CQL Performance With Apache Cassandra 3.X
 
Spark Cassandra Connector Dataframes
Spark Cassandra Connector DataframesSpark Cassandra Connector Dataframes
Spark Cassandra Connector Dataframes
 
Cassandra Fundamentals - C* 2.0
Cassandra Fundamentals - C* 2.0Cassandra Fundamentals - C* 2.0
Cassandra Fundamentals - C* 2.0
 
Querying federations 
of Triple Pattern Fragments
Querying federations 
of Triple Pattern FragmentsQuerying federations 
of Triple Pattern Fragments
Querying federations 
of Triple Pattern Fragments
 
Atmosphere Conference 2015: Need for Async: In pursuit of scalable internet-s...
Atmosphere Conference 2015: Need for Async: In pursuit of scalable internet-s...Atmosphere Conference 2015: Need for Async: In pursuit of scalable internet-s...
Atmosphere Conference 2015: Need for Async: In pursuit of scalable internet-s...
 
Akka Cluster in Production
Akka Cluster in ProductionAkka Cluster in Production
Akka Cluster in Production
 
Introduction to Cassandra
Introduction to CassandraIntroduction to Cassandra
Introduction to Cassandra
 
Kick-R: Get your own R instance with 36 cores on AWS
Kick-R: Get your own R instance with 36 cores on AWSKick-R: Get your own R instance with 36 cores on AWS
Kick-R: Get your own R instance with 36 cores on AWS
 

More from DataStax

Is Your Enterprise Ready to Shine This Holiday Season?
Is Your Enterprise Ready to Shine This Holiday Season?Is Your Enterprise Ready to Shine This Holiday Season?
Is Your Enterprise Ready to Shine This Holiday Season?
DataStax
 
Designing Fault-Tolerant Applications with DataStax Enterprise and Apache Cas...
Designing Fault-Tolerant Applications with DataStax Enterprise and Apache Cas...Designing Fault-Tolerant Applications with DataStax Enterprise and Apache Cas...
Designing Fault-Tolerant Applications with DataStax Enterprise and Apache Cas...
DataStax
 
Running DataStax Enterprise in VMware Cloud and Hybrid Environments
Running DataStax Enterprise in VMware Cloud and Hybrid EnvironmentsRunning DataStax Enterprise in VMware Cloud and Hybrid Environments
Running DataStax Enterprise in VMware Cloud and Hybrid Environments
DataStax
 
Best Practices for Getting to Production with DataStax Enterprise Graph
Best Practices for Getting to Production with DataStax Enterprise GraphBest Practices for Getting to Production with DataStax Enterprise Graph
Best Practices for Getting to Production with DataStax Enterprise Graph
DataStax
 
Webinar | Data Management for Hybrid and Multi-Cloud: A Four-Step Journey
Webinar | Data Management for Hybrid and Multi-Cloud: A Four-Step JourneyWebinar | Data Management for Hybrid and Multi-Cloud: A Four-Step Journey
Webinar | Data Management for Hybrid and Multi-Cloud: A Four-Step Journey
DataStax
 
Webinar | How to Understand Apache Cassandra™ Performance Through Read/Writ...
Webinar  |  How to Understand Apache Cassandra™ Performance Through Read/Writ...Webinar  |  How to Understand Apache Cassandra™ Performance Through Read/Writ...
Webinar | How to Understand Apache Cassandra™ Performance Through Read/Writ...
DataStax
 
Webinar | Better Together: Apache Cassandra and Apache Kafka
Webinar  |  Better Together: Apache Cassandra and Apache KafkaWebinar  |  Better Together: Apache Cassandra and Apache Kafka
Webinar | Better Together: Apache Cassandra and Apache Kafka
DataStax
 
Top 10 Best Practices for Apache Cassandra and DataStax Enterprise
Top 10 Best Practices for Apache Cassandra and DataStax EnterpriseTop 10 Best Practices for Apache Cassandra and DataStax Enterprise
Top 10 Best Practices for Apache Cassandra and DataStax Enterprise
DataStax
 
Introduction to Apache Cassandra™ + What’s New in 4.0
Introduction to Apache Cassandra™ + What’s New in 4.0Introduction to Apache Cassandra™ + What’s New in 4.0
Introduction to Apache Cassandra™ + What’s New in 4.0
DataStax
 
Webinar: How Active Everywhere Database Architecture Accelerates Hybrid Cloud...
Webinar: How Active Everywhere Database Architecture Accelerates Hybrid Cloud...Webinar: How Active Everywhere Database Architecture Accelerates Hybrid Cloud...
Webinar: How Active Everywhere Database Architecture Accelerates Hybrid Cloud...
DataStax
 
Webinar | Aligning GDPR Requirements with Today's Hybrid Cloud Realities
Webinar  |  Aligning GDPR Requirements with Today's Hybrid Cloud RealitiesWebinar  |  Aligning GDPR Requirements with Today's Hybrid Cloud Realities
Webinar | Aligning GDPR Requirements with Today's Hybrid Cloud Realities
DataStax
 
Designing a Distributed Cloud Database for Dummies
Designing a Distributed Cloud Database for DummiesDesigning a Distributed Cloud Database for Dummies
Designing a Distributed Cloud Database for Dummies
DataStax
 
How to Power Innovation with Geo-Distributed Data Management in Hybrid Cloud
How to Power Innovation with Geo-Distributed Data Management in Hybrid CloudHow to Power Innovation with Geo-Distributed Data Management in Hybrid Cloud
How to Power Innovation with Geo-Distributed Data Management in Hybrid Cloud
DataStax
 
How to Evaluate Cloud Databases for eCommerce
How to Evaluate Cloud Databases for eCommerceHow to Evaluate Cloud Databases for eCommerce
How to Evaluate Cloud Databases for eCommerce
DataStax
 
Webinar: DataStax Enterprise 6: 10 Ways to Multiply the Power of Apache Cassa...
Webinar: DataStax Enterprise 6: 10 Ways to Multiply the Power of Apache Cassa...Webinar: DataStax Enterprise 6: 10 Ways to Multiply the Power of Apache Cassa...
Webinar: DataStax Enterprise 6: 10 Ways to Multiply the Power of Apache Cassa...
DataStax
 
Webinar: DataStax and Microsoft Azure: Empowering the Right-Now Enterprise wi...
Webinar: DataStax and Microsoft Azure: Empowering the Right-Now Enterprise wi...Webinar: DataStax and Microsoft Azure: Empowering the Right-Now Enterprise wi...
Webinar: DataStax and Microsoft Azure: Empowering the Right-Now Enterprise wi...
DataStax
 
Webinar - Real-Time Customer Experience for the Right-Now Enterprise featurin...
Webinar - Real-Time Customer Experience for the Right-Now Enterprise featurin...Webinar - Real-Time Customer Experience for the Right-Now Enterprise featurin...
Webinar - Real-Time Customer Experience for the Right-Now Enterprise featurin...
DataStax
 
Datastax - The Architect's guide to customer experience (CX)
Datastax - The Architect's guide to customer experience (CX)Datastax - The Architect's guide to customer experience (CX)
Datastax - The Architect's guide to customer experience (CX)
DataStax
 
An Operational Data Layer is Critical for Transformative Banking Applications
An Operational Data Layer is Critical for Transformative Banking ApplicationsAn Operational Data Layer is Critical for Transformative Banking Applications
An Operational Data Layer is Critical for Transformative Banking Applications
DataStax
 
Becoming a Customer-Centric Enterprise Via Real-Time Data and Design Thinking
Becoming a Customer-Centric Enterprise Via Real-Time Data and Design ThinkingBecoming a Customer-Centric Enterprise Via Real-Time Data and Design Thinking
Becoming a Customer-Centric Enterprise Via Real-Time Data and Design Thinking
DataStax
 

More from DataStax (20)

Is Your Enterprise Ready to Shine This Holiday Season?
Is Your Enterprise Ready to Shine This Holiday Season?Is Your Enterprise Ready to Shine This Holiday Season?
Is Your Enterprise Ready to Shine This Holiday Season?
 
Designing Fault-Tolerant Applications with DataStax Enterprise and Apache Cas...
Designing Fault-Tolerant Applications with DataStax Enterprise and Apache Cas...Designing Fault-Tolerant Applications with DataStax Enterprise and Apache Cas...
Designing Fault-Tolerant Applications with DataStax Enterprise and Apache Cas...
 
Running DataStax Enterprise in VMware Cloud and Hybrid Environments
Running DataStax Enterprise in VMware Cloud and Hybrid EnvironmentsRunning DataStax Enterprise in VMware Cloud and Hybrid Environments
Running DataStax Enterprise in VMware Cloud and Hybrid Environments
 
Best Practices for Getting to Production with DataStax Enterprise Graph
Best Practices for Getting to Production with DataStax Enterprise GraphBest Practices for Getting to Production with DataStax Enterprise Graph
Best Practices for Getting to Production with DataStax Enterprise Graph
 
Webinar | Data Management for Hybrid and Multi-Cloud: A Four-Step Journey
Webinar | Data Management for Hybrid and Multi-Cloud: A Four-Step JourneyWebinar | Data Management for Hybrid and Multi-Cloud: A Four-Step Journey
Webinar | Data Management for Hybrid and Multi-Cloud: A Four-Step Journey
 
Webinar | How to Understand Apache Cassandra™ Performance Through Read/Writ...
Webinar  |  How to Understand Apache Cassandra™ Performance Through Read/Writ...Webinar  |  How to Understand Apache Cassandra™ Performance Through Read/Writ...
Webinar | How to Understand Apache Cassandra™ Performance Through Read/Writ...
 
Webinar | Better Together: Apache Cassandra and Apache Kafka
Webinar  |  Better Together: Apache Cassandra and Apache KafkaWebinar  |  Better Together: Apache Cassandra and Apache Kafka
Webinar | Better Together: Apache Cassandra and Apache Kafka
 
Top 10 Best Practices for Apache Cassandra and DataStax Enterprise
Top 10 Best Practices for Apache Cassandra and DataStax EnterpriseTop 10 Best Practices for Apache Cassandra and DataStax Enterprise
Top 10 Best Practices for Apache Cassandra and DataStax Enterprise
 
Introduction to Apache Cassandra™ + What’s New in 4.0
Introduction to Apache Cassandra™ + What’s New in 4.0Introduction to Apache Cassandra™ + What’s New in 4.0
Introduction to Apache Cassandra™ + What’s New in 4.0
 
Webinar: How Active Everywhere Database Architecture Accelerates Hybrid Cloud...
Webinar: How Active Everywhere Database Architecture Accelerates Hybrid Cloud...Webinar: How Active Everywhere Database Architecture Accelerates Hybrid Cloud...
Webinar: How Active Everywhere Database Architecture Accelerates Hybrid Cloud...
 
Webinar | Aligning GDPR Requirements with Today's Hybrid Cloud Realities
Webinar  |  Aligning GDPR Requirements with Today's Hybrid Cloud RealitiesWebinar  |  Aligning GDPR Requirements with Today's Hybrid Cloud Realities
Webinar | Aligning GDPR Requirements with Today's Hybrid Cloud Realities
 
Designing a Distributed Cloud Database for Dummies
Designing a Distributed Cloud Database for DummiesDesigning a Distributed Cloud Database for Dummies
Designing a Distributed Cloud Database for Dummies
 
How to Power Innovation with Geo-Distributed Data Management in Hybrid Cloud
How to Power Innovation with Geo-Distributed Data Management in Hybrid CloudHow to Power Innovation with Geo-Distributed Data Management in Hybrid Cloud
How to Power Innovation with Geo-Distributed Data Management in Hybrid Cloud
 
How to Evaluate Cloud Databases for eCommerce
How to Evaluate Cloud Databases for eCommerceHow to Evaluate Cloud Databases for eCommerce
How to Evaluate Cloud Databases for eCommerce
 
Webinar: DataStax Enterprise 6: 10 Ways to Multiply the Power of Apache Cassa...
Webinar: DataStax Enterprise 6: 10 Ways to Multiply the Power of Apache Cassa...Webinar: DataStax Enterprise 6: 10 Ways to Multiply the Power of Apache Cassa...
Webinar: DataStax Enterprise 6: 10 Ways to Multiply the Power of Apache Cassa...
 
Webinar: DataStax and Microsoft Azure: Empowering the Right-Now Enterprise wi...
Webinar: DataStax and Microsoft Azure: Empowering the Right-Now Enterprise wi...Webinar: DataStax and Microsoft Azure: Empowering the Right-Now Enterprise wi...
Webinar: DataStax and Microsoft Azure: Empowering the Right-Now Enterprise wi...
 
Webinar - Real-Time Customer Experience for the Right-Now Enterprise featurin...
Webinar - Real-Time Customer Experience for the Right-Now Enterprise featurin...Webinar - Real-Time Customer Experience for the Right-Now Enterprise featurin...
Webinar - Real-Time Customer Experience for the Right-Now Enterprise featurin...
 
Datastax - The Architect's guide to customer experience (CX)
Datastax - The Architect's guide to customer experience (CX)Datastax - The Architect's guide to customer experience (CX)
Datastax - The Architect's guide to customer experience (CX)
 
An Operational Data Layer is Critical for Transformative Banking Applications
An Operational Data Layer is Critical for Transformative Banking ApplicationsAn Operational Data Layer is Critical for Transformative Banking Applications
An Operational Data Layer is Critical for Transformative Banking Applications
 
Becoming a Customer-Centric Enterprise Via Real-Time Data and Design Thinking
Becoming a Customer-Centric Enterprise Via Real-Time Data and Design ThinkingBecoming a Customer-Centric Enterprise Via Real-Time Data and Design Thinking
Becoming a Customer-Centric Enterprise Via Real-Time Data and Design Thinking
 

Recently uploaded

OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
Alina Yurenko
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Neo4j
 
Pro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp BookPro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp Book
abdulrafaychaudhry
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 

Recently uploaded (20)

OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
 
Pro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp BookPro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp Book
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 

How Cassandra Deletes Data (Alain Rodriguez, The Last Pickle) | Cassandra Summit 2016

  • 1. Licensed under a Creative Commons Attribution-NonCommercial 3.0 New Zealand License HOW CASSANDRA DELETES DATA Alain Rodriguez
  • 2. • Tombstone issues • Why tombstones • Tombstone removal
  • 4. About The Last Pickle
  • 5. About The Last Pickle and Alain Rodriguez
  • 6. About The Last Pickle and Alain Rodriguez
  • 7.
  • 8.
  • 9. About deletes in Cassandra Deleted data in Cassandra do not just disappear,
  • 10. Deleted data in Cassandra do not just disappear, instead a tombstone is added. About deletes in Cassandra
  • 11. Ok so what’s the matter, why this talk ? Tombstone are needed in Cassandra, not an issue…
  • 12. Ok so what’s the matter, why this talk ? Tombstone are needed in Cassandra, not an issue… …until an SSTables or a result to a query look like this…
  • 13.
  • 14. Then we can see that in the user mailing list or other community tools Ok so what’s the matter, why this talk ?
  • 15. Then we can see that in the user mailing list or other community tools So I thought I could share, about this topic. thelastpickle.com/blog/2016/07/27/about-deletes-and-tombstones.html Ok so what’s the matter, why this talk ?
  • 17. Tombstone issues: impacts The read path: Reading tombstones induces Latencies, Timeouts or Exceptions
  • 18. Tombstone issues: impacts The read path: Reading tombstones induces Latencies, Timeouts or Exceptions The disk space: tombstones can fill up the disk 100%
  • 19. Tombstone issues: impacts The read path: Reading tombstones induces Latencies, Timeouts or Exceptions The disk space: tombstones can fill up the disk I am facing one of these issues, is it caused by tombstones? 100%
  • 20. Tombstone issues: Read Path grep -i -e "ERROR" -e "WARN" /var/log/cassandra/system.log
  • 21. Tombstone issues: Read Path grep -i -e "ERROR" -e "WARN" /var/log/cassandra/system.log WARN [SharedPool-Worker-7] 2016-07-16 16:31:09,048 SliceQueryFilter.java:319 - Read 276 live and 1104 tombstone cells in mykeyspace.mytable for key: ItV9kZC8mFNiSvYM8AwufBU8tTtJkW5dUH5MNcq1H18 (see tombstone_warn_threshold). 500 columns were requested, slices=[-]
  • 22. Tombstone issues: Read Path grep -i -e "ERROR" -e "WARN" /var/log/cassandra/system.log WARN [SharedPool-Worker-7] 2016-07-16 16:31:09,048 SliceQueryFilter.java:319 - Read 276 live and 1104 tombstone cells in mykeyspace.mytable for key: ItV9kZC8mFNiSvYM8AwufBU8tTtJkW5dUH5MNcq1H18 (see tombstone_warn_threshold). 500 columns were requested, slices=[-] ERROR [ReadStage:290729] 2016-07-16 17:00:18,708 SliceQueryFilter.java (line 206) Scanned over 100000 tombstones in mykeyspace.mytable; query aborted (see tombstone_failure_threshold) ERROR [ReadStage:290729] 2016-04-22 17:00:18,709 CassandraDaemon.java (line 258) Exception in threadThread[ReadStage:290729,5,main] java.lang.RuntimeException: org.apache.cassandra.db.filter.TombstoneOverwhelmingException
  • 23. Tombstone issues: Read Path tombstoneScannedHistogram metric Through nodetool cfstats, JMX…
  • 24. Tombstone issues: Read Path tombstoneScannedHistogram metric Through or a plugged monitoring tool such as Datadog, Grafana, SPM, OpsCenter… Commercial Free
  • 25. Tombstone issues: Disk space DroppableTombstoneRatio metric provide interesting info.
  • 26. Tombstone issues: Disk space DroppableTombstoneRatio metric provide interesting info. Through sstablemetadata tool, JMX and plugged monitoring tool such as Datadog, Grafana, SPM, OpsCenter, etc. Possible to write a script to check biggest SSTables ratio for example
  • 27. Why tombstones? I want to remove data !
  • 28. WhyTombstones: Cassandra write path Write path Client write Memory Disk Memtable Commit Log SSTable SSTable SSTable SSTable Cassandra node Flush Immutable
  • 29. WhyTombstones: Cassandra write path Write path Client write Memory Disk Memtable Commit Log SSTable SSTable SSTable SSTable Cassandra node Immutable Client read Flush
  • 30. WhyTombstones: Distributed system Cassandra is a distributed system Distributed deletes are tricky !
  • 31. WhyTombstones: Cassandra consistency Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 Strong
 Consistency
  • 32. WhyTombstones: Cassandra consistency Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 Strong
 Consistency Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 ? ? ? Client write “A” Strong
 Consistency
  • 33. WhyTombstones: Cassandra consistency Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 Strong
 Consistency Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 ? ? ? Client write “A” Strong
 Consistency Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A ? Client write “A” Ack Ack Strong
 Consistency
  • 34. WhyTombstones: Cassandra consistency Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 Strong
 Consistency Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 ? ? ? Client write “A” Strong
 Consistency Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A ? Client write “A” Ack Ack Strong
 Consistency Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A ? Client write “A” Client read “A ” Ack Ack Strong
 Consistency
  • 35. WhyTombstones: Cassandra consistency & availability Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 Strong
 Consistency Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 ? ? ? Client write “A” Strong
 Consistency Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A ? Client write “A” Ack Ack Strong
 Consistency Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A ? Client write “A” Client read “A ” Ack Ack Strong
 Consistency Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A Down Client write “A” Client read “A” Ack Ack High
 availability
  • 36. WhyTombstones: Distributed deletes Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 Strong
 Consistency Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 ? ? ? Client write “A” Strong
 Consistency Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A ? Client write “A” Ack Ack Strong
 Consistency Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A ? Client write “A” Client read “A ” Ack Ack Strong
 Consistency WITHOUT Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A A
  • 37. WhyTombstones: Distributed deletes Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 Strong
 Consistency Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 ? ? ? Client write “A” Strong
 Consistency Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A ? Client write “A” Ack Ack Strong
 Consistency Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A ? Client write “A” Client read “A ” Ack Ack Strong
 Consistency WITHOUT Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A A WITHOUT Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A A Client delete “A”
  • 38. WhyTombstones: Distributed deletes Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 Strong
 Consistency Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 ? ? ? Client write “A” Strong
 Consistency Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A ? Client write “A” Ack Ack Strong
 Consistency Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A ? Client write “A” Client read “A ” Ack Ack Strong
 Consistency WITHOUT Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A A WITHOUT Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A A Client delete “A” WITHOUT Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A Client delete “A” Ack Ack
  • 39. WhyTombstones: Distributed deletes Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 Strong
 Consistency Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 ? ? ? Client write “A” Strong
 Consistency Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A ? Client write “A” Ack Ack Strong
 Consistency Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A ? Client write “A” Client read “A ” Ack Ack Strong
 Consistency WITHOUT Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A A WITHOUT Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A A Client delete “A” WITHOUT Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A Client delete “A” Ack Ack WITHOUT Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A Client delete “A” Client read “A” Ack Ack Wrong
  • 40. WhyTombstones: Distributed deletes Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 Strong
 Consistency Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 ? ? ? Client write “A” Strong
 Consistency Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A ? Client write “A” Ack Ack Strong
 Consistency Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A ? Client write “A” Client read “A ” Ack Ack Strong
 Consistency WITHOUT Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A A WITHOUT Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A A Client delete “A” WITHOUT Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A Client delete “A” Ack Ack WITHOUT Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A Client delete “A” Client read “empty” Ack Ack Correct
  • 41. WhyTombstones: Distributed deletes WITH Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A A Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 Strong
 Consistency Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 ? ? ? Client write “A” Strong
 Consistency Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A ? Client write “A” Ack Ack Strong
 Consistency Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A ? Client write “A” Client read “A ” Ack Ack Strong
 Consistency WITHOUT Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A A WITHOUT Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A A Client delete “A” WITHOUT Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A Client delete “A” Ack Ack WITHOUT Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A Client delete “A” Client read “A” Ack Ack Wrong
  • 42. WhyTombstones: Distributed deletes WITH Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A A WITH Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A A Client delete “A” Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 Strong
 Consistency Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 ? ? ? Client write “A” Strong
 Consistency Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A ? Client write “A” Ack Ack Strong
 Consistency Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A ? Client write “A” Client read “A ” Ack Ack Strong
 Consistency WITHOUT Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A A WITHOUT Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A A Client delete “A” WITHOUT Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A Client delete “A” Ack Ack WITHOUT Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A Client delete “A” Client read “A” Ack Ack Wrong
  • 43. WhyTombstones: Distributed deletes WITH Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A A WITH Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2
 A* =Tombstone on A A A A Client delete “A” WITH Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2
 A* =Tombstone on A A* A* A Client delete “A” Ack Ack Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 Strong
 Consistency Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 ? ? ? Client write “A” Strong
 Consistency Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A ? Client write “A” Ack Ack Strong
 Consistency Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A ? Client write “A” Client read “A ” Ack Ack Strong
 Consistency WITHOUT Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A A WITHOUT Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A A Client delete “A” WITHOUT Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A Client delete “A” Ack Ack WITHOUT Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A Client delete “A” Client read “A” Ack Ack Wrong
  • 44. WhyTombstones: Distributed deletes WITH Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A A WITH Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2
 A* =Tombstone on A A A A Client delete “A” WITH Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2
 A* =Tombstone on A A* A* A Client delete “A” Ack Ack WITH Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A* =Tombstone on A A* A* A Client delete “A” Client read “A*”
 meaning “empty” Ack Ack Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 Strong
 Consistency Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 ? ? ? Client write “A” Strong
 Consistency Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A ? Client write “A” Ack Ack Strong
 Consistency Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A ? Client write “A” Client read “A ” Ack Ack Strong
 Consistency WITHOUT Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A A WITHOUT Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A A Client delete “A” WITHOUT Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A Client delete “A” Ack Ack WITHOUT Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A Client delete “A” Client read “A” Ack Ack Wrong Correct
  • 45. Cool story, but I really want to remove the data ! Tombstone removal!
  • 46. When are tombstones removed? When should tombstones be removed? • Once the tombstone is fully replicated • When deleted data has been removed
  • 47. When are tombstones removed? When should tombstones be removed? • Once the tombstone is fully replicated • When deleted data has been removed When are tombstones actually removed? • After gc_grace_seconds • During compactions
 IF all the deleted data and the tombstone itself are involved
  • 48. How tombstones are removed: Compaction! Write path Client write Memory Disk Memtable Commit Log SSTable SSTable SSTable SSTable Cassandra node Immutable Client read Flush
  • 49. How tombstones are removed: Compaction! Write path Client write Memory Disk Memtable Commit Log SSTable SSTable SSTable SSTable Cassandra node Immutable Client read Compacting 4 SSTables Flush
  • 50. How tombstones are removed: Compaction! Write path Client write Memory Disk Memtable Commit Log SSTable Cassandra node Immutable Client read Flush
  • 51. Implications in the real world • No compaction = no eviction • + TTLs or deletes, tombstone stack (up to 100%)
  • 52. Implications in the real world • No compaction = no eviction • + TTLs or deletes, tombstone stack (up to 100%) • Overlapping SSTable = no eviction • Fragmented data = eviction unlikely • LCS: tombstone level ≠ than data level = no eviction
  • 53. Implications in the real world • No compaction = no eviction • + TTLs or deletes, tombstone stack (up to 100%) • Overlapping SSTable = no eviction • Fragmented data = eviction unlikely • LCS: tombstone level ≠ than data level = no eviction • TTL << gc_grace_seconds = high % of useless data
  • 54. Some tuning ! Good news: Cassandra community and Committers are Awesome!
  • 55. Some tuning ! Issue: No compaction = No eviction CASSANDRA-3442: tombstone_threshold (C* 1.2.b1) Compaction option, default: tombstone_threshold = 0.2 (ratio = 20% has been deleted) Single SSTable compaction triggered based on an estimate! Low risk: worst case —> No-op
  • 56. Some tuning ! Issue: Tombstone compaction loop! CASSANDRA-4022: Check for key overlaps (C* 1.2.b1) Internals improvement, not an option: Estimated droppable tombstone improved Now considering key overlapping with other SSTable
  • 57. Some tuning ! Issue: Tombstone compaction loop! CASSANDRA-4781: tombstone_compaction_interval (C* 1.2.b2) Compaction option, default: tombstone_compaction_interval = 86400 (in seconds = 1 day) Definitely prevents loops
  • 58. Some tuning ! Issue: Compacting to remove tombstone is expensive CASSANDRA-5228: Expired SSTables (C*2.0.b1) Internals improvement, not an option Effective with Time series, DTCS / TWCS and TTLs !
  • 59. Some tuning ! Issue: Tombstone compactions not triggering CASSANDRA-6563: unchecked_tombstone_compaction (C* 2.0.9) Compaction option, default: unchecked_tombstone_compaction = false CASSANDRA-4022 becomes an option
  • 60. Some tuning ! Issue: Overlapping preventing efficient tombstone compactions CASSANDRA-7019: provide_overlapping_tombstones (C* 3.10) Compaction option, default: provide_overlapping_tombstones = NONE (CELL / ROW / NONE) Risky: • Not yet released, so not really tested • Heavier tombstones compactions
  • 61. Some tuning -Tombstone distribution ! WITH Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A A WITH Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2
 A* =Tombstone on A A A A Client delete “A” WITH Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2
 A* =Tombstone on A A* A* A Client delete “A” Ack Ack WITH Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A* =Tombstone on A A* A* A Client delete “A” Client read “A*”
 meaning “empty” Ack Ack Correct Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 Strong
 Consistency Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 ? ? ? Client write “A” Strong
 Consistency Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A ? Client write “A” Ack Ack Strong
 Consistency Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A ? Client write “A” Client read “A ” Ack Ack Strong
 Consistency WITHOUT Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A A WITHOUT Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A A Client delete “A” WITHOUT Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A Client delete “A” Ack Ack Tombstones not replicated
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A* =Tombstone on A A* A* A Client delete “A” Client read “A*” Ack Ack Correct
  • 62. Some tuning -Tombstone distribution ! Case were node fail + no repair = Case without tombstone WITH Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A A WITH Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2
 A* =Tombstone on A A A A Client delete “A” WITH Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2
 A* =Tombstone on A A* A* A Client delete “A” Ack Ack WITH Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A* =Tombstone on A A* A* A Client delete “A” Client read “A*”
 meaning “empty” Ack Ack Correct Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 Strong
 Consistency Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 ? ? ? Client write “A” Strong
 Consistency Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A ? Client write “A” Ack Ack Strong
 Consistency Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A ? Client write “A” Client read “A ” Ack Ack Strong
 Consistency WITHOUT Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A A WITHOUT Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A A Client delete “A” WITHOUT Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A Client delete “A” Ack Ack Tombstones not replicated
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A* =Tombstone on A A* AClient read “A” Wrong A* removed
  • 63. Some tuning -Tombstone distribution ! Case were node fail + no repair = Case without tombstone = Zombie data ! WITH Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A A WITH Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2
 A* =Tombstone on A A A A Client delete “A” WITH Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2
 A* =Tombstone on A A* A* A Client delete “A” Ack Ack WITH Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A* =Tombstone on A A* A* A Client delete “A” Client read “A*”
 meaning “empty” Ack Ack Correct Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 Strong
 Consistency Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 ? ? ? Client write “A” Strong
 Consistency Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A ? Client write “A” Ack Ack Strong
 Consistency Consistency
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A ? Client write “A” Client read “A ” Ack Ack Strong
 Consistency WITHOUT Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A A WITHOUT Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A A Client delete “A” WITHOUT Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A Client delete “A” Ack Ack Tombstones not replicated
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A* =Tombstone on A AClient read “A” Wrong A* removed
  • 64. Some tuning -Tombstone distribution ! CASSANDRA-6434 (C*3.0.b1): only_purge_repaired_tombstones (Default: False) WITH Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A A WITH Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2
 A* =Tombstone on A A A A Client delete “A” WITH Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2
 A* =Tombstone on A A* A* A Client delete “A” Ack Ack Tombstones not replicated
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A* =Tombstone on A A* A* A A* not removed Client read “A*”
 meaning “empty” Correct
  • 65. Some tuning -Tombstone distribution ! CASSANDRA-6434 (C*3.0.b1): only_purge_repaired_tombstones (Default: False) Limitation Repair failing or no repair = permanent tombstone WITH Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A A A WITH Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2
 A* =Tombstone on A A A A Client delete “A” WITH Tombstones
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2
 A* =Tombstone on A A* A* A Client delete “A” Ack Ack Tombstones not replicated
 Cassandra Cluster
 4 nodes
 RF = 3
 Write CL = Quorum = 2 Read CL = Quorum = 2 A* =Tombstone on A A* A* A A* not removed Client read “A*”
 meaning “empty” Correct
  • 66.
  • 68. Things we know about tombstones • Tombstones due to deletes and TTLs • Tombstone fits with Cassandra write path • Tombstones ensure consistency • Reading tombstones is expensive and can produce failures • Tombstones take space on disk and might be tricky to remove • Tombstones need to be distributed before being removed
  • 69. Takeaways • Model data and workflow to avoid to reading many tombstones • Deleted data = repair table within gc_grace_seconds • Monitor tombstones, keep control! (Set some alerts ?) • Use compaction options to tackle problems, there is always a way. • Is there no way? Ask, or create a Jira and keep improving Cassandra!