[ https://issues.apache.org/jira/browse/CASSANDRA-8205?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yuki Morishita updated CASSANDRA-8205: -------------------------------------- Attachment: 8205-2.0.txt Attaching patch that defers size calculation to the time when SSTableDeletionTask is run. (This includes test previously attached.) > 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, > 8205-2.0.txt > > > 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)