0

we are using a cassandra single node cluster for experimenting and one problem we are hitting now is tombstones cells. Each row contain 2 tombstone cells and we are stuck in trying to remove them. They are causing abortion of our queries as tombstones threshold is reached quite quickly.

This is the tracing output when reading one row: Read 1 live rows and 2 tombstone cells [ReadStage-2]

I've tried to use nodetool garbagecollector, with a proper -g option (CELL or ROW) but never changed. Why tombostone cells are not removed after running this command? I've also tried the flush command...

Versions:

Cassandra version: 3.11.2 Thrift API version: 20.1.0 CQL supported versions: 3.4.4 (default: 3.4.4)

The error is the following:

WARN [ReadStage-2] 2018-08-06 12:26:29,269 ReadCommand.java:555 - Read 50000 live rows and 100001 tombstone cells for query SELECT * FROM mykeyspace.mytable WHERE myid > 1025493673608400896 AND token(collectionid, ttype) >= token(10, collected) AND token(collectionid, ttype) <= token(10, collected) LIMIT 1000 (see tombstone_warn_threshold) ERROR [ReadStage-2] 2018-08-06 12:26:29,272 StorageProxy.java:1906 - Scanned over 100001 tombstones during query 'SELECT * FROM mykeyspace.mytable WHERE myid > 1025493673608400896 AND token(collectionid, ttype) >= token(10, collected) AND token(collectionid, ttype) <= token(10, collected) LIMIT 1000' (last scanned row partion key was ((10, collected), 1025494834679873536)); query aborted

What am I missing in C* garbage collecting thing? Any help in clarifying this behavior would be great! Thanks.

BangTheBank
  • 121
  • 3

1 Answers1

2

Tombstone were correctly garbage collected but gc was respecting the gc_grace_seconds value set for the column family (default 10 days). After altered the table with the following cqlsh command:

alter table mykeyspace.mytable with gc_grace_seconds = 0; tombstones were dropped completely.

Just to be sure, but maybe wasn't needed, I run again nodetool garbagecollector and nodetool compact for that table.

BangTheBank
  • 121
  • 3