0

I have table with LCS in Cassandra cluster. I am observing too may tombstones in my cluster so I have decided to reduce GC grace seconds and performing major compaction. Ran nodetoolcompact keyspace table but compaction job ran within a second. it seems major compaction not worked. Can you please help me to understand.

LetsNoSQL
  • 1,478
  • 1
  • 11
  • 23
  • You used the "cassandra-2.0" label on your question, are you actually using Cassandra 2.0? Or a newer version? – Nadav Har'El Jun 03 '19 at 11:09
  • 1
    Yes, my Cassandra version is 2.0.x. So if I want to clear huge tombstones what is the best way in this case? – LetsNoSQL Jun 03 '19 at 14:43
  • I think that, unfortunately, really the best way would be to upgrade (to Casandra 2.2 or beyond, or to Scylla). Another somewhat ugly but possible way can be to try to switch to size-tiered compaction strategy, do major compaction, and then switch back (I never tried this procedure myself, hopefully it will work...). Finally, note that there are no "huge tombstones". Tombstones are tiny - only a deletion record, no data. But maybe you do have a huge number of them. – Nadav Har'El Jun 04 '19 at 05:14
  • @Nadav Okay Thank you so much clarification. – LetsNoSQL Jun 04 '19 at 06:40

1 Answers1

2

If you're actually using the antique Cassandra 2.0, as the label on your question said, then indeed it didn't support major compaction on LCS, and "nodetool compact" only triggered a minor compaction which would have happened anyway (unless explicitly disabled). This was fixed in Cassandra 2.2 - see the issue https://issues.apache.org/jira/browse/CASSANDRA-7272.

There are still ongoing plans to improve major compaction on LCS further - see https://issues.apache.org/jira/browse/CASSANDRA-11817 - but it should already work reasonably well and shouldn't finish "within a second" as you reported - unless you really are running Cassandra 2.0.

Nadav Har'El
  • 11,785
  • 1
  • 24
  • 45