cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Tang <>
Subject Compaction not remove the deleted data from secondary index when use TTL
Date Fri, 20 Jul 2012 05:03:12 GMT

     For some consistency problem, we can not use delete direct to delete
one row, and then we use TTL for each column of the row.

     We using the Cassandra as the central storage of the stateful system.
All request will be stored in Cassandra, and marked as status;NEW, and then
we change it to status:EXECUTING, then delete it (by TTL).

     And we use secondary index of column 'status', and after process 4
million requests, most of the requests are deleted from Cassandra.

     After executing compact from nodetool, the size of CF Requests SSTable
is decreased to about 20M, but the Requests.idxStatus
is continuously increased, and about 1.6G.

     And from the system log, I found the compact command from nodetool
will not trigger the compaction of the secondary index, but during the
traffic, when compaction of the CF Requests triggered, the compaction of
the index will be started also.

    But the size of the SSTable not decreased as expected, it seems the
data in secondary index not deleted. And since we only have 3 status, I can
found such log
 INFO [CompactionExecutor:31] 2012-07-20 10:30:50,532 (line 129) Compacting large row demo/
Requests.idxStatus:EXECUTING (264045300 bytes) incrementally

    So why the secondary index not compact to small size as expected, is it
related to TTL?

    And is it possible to rebuild the index ?


View raw message