Uploaded image for project: 'Apache Cassandra'
  1. Apache Cassandra
  2. CASSANDRA-8205

ColumnFamilyMetrics#totalDiskSpaceUsed gets wrong value when SSTable is deleted

    XMLWordPrintableJSON

Details

    • Low

    Description

      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).

      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".

      Attachments

        1. 0001-ColumnFamilyMetrics-size-metrics-test.patch
          3 kB
          Yuki Morishita
        2. 8205-2.0.txt
          4 kB
          Yuki Morishita

        Issue Links

          Activity

            People

              yukim Yuki Morishita
              yukim Yuki Morishita
              Yuki Morishita
              Marcus Eriksson
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: