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

Cfstats estimate number of keys should return 0 for empty table

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Low
    • Resolution: Fixed
    • Fix Version/s: 2.2.7, 3.0.7, 3.7
    • Component/s: Legacy/Tools
    • Labels:
    • Environment:

      Cassandra 2.1.13
      Nodeltool

    • Severity:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: