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

Cfstats estimate number of keys should return 0 for empty table

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 2.2.7, 3.0.7, 3.7
    • Legacy/Tools
    • Cassandra 2.1.13
      Nodeltool

    • Low

    Description

      If sstable count is 0, the "estimate number of keys" in cfstats shows -1.

      SSTable count: 0
      Number of keys (estimate): -1
      

      The initial value of keyCount in SSTableReader is -1. When there is no sstable, nor entry in memtable, the keyCount isn't increased. Cfstats should have some boundary check and return 0 for this case.

      Attachments

        Activity

          People

            mahdix Mahdi Mohammadinasab
            jane.deng@datastax.com Jane Deng
            Mahdi Mohammadinasab
            Yuki Morishita
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: