Yuki Morishita created CASSANDRA-8205:
-----------------------------------------

             Summary: ColumnFamilyMetrics#totalDiskSpaceUsed gets wrong value 
when SSTable is deleted
                 Key: CASSANDRA-8205
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-8205
             Project: Cassandra
          Issue Type: Bug
            Reporter: Yuki Morishita
            Priority: Minor
             Fix For: 2.0.12, 2.1.2
         Attachments: 0001-ColumnFamilyMetrics-size-metrics-test.patch

ColumnFamilyMetrics#totalDiskSpaceUsed is decremented when actual SSTables 
files are deleted from disk. The amount of decrement is calculated at the 
beginning of SSTableReader instantiation(through 
[SSTableDeletionTask|https://github.com/apache/cassandra/blob/cassandra-2.0.11/src/java/org/apache/cassandra/io/sstable/SSTableDeletingTask.java#L56]).

But the size can change because Summary.db file may be re-created after 
SSTableReader instantiation, and that leads to calculate wrong value for 
totalDiskSpaceUsed.

I attached unit test file for 2.0, but you can also compare the value after 
doing "TRUNCATE".



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to