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

Cfstats estimate number of keys should return 0 for empty table

Agile BoardAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            mahdix Mahdi Mohammadinasab Assign to me
            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:

              Slack

                Issue deployment