[
https://issues.apache.org/jira/browse/CASSANDRA-11587?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Yuki Morishita updated CASSANDRA-11587:
---------------------------------------
Resolution: Fixed
Fix Version/s: (was: 3.6)
(was: 3.0.x)
(was: 2.2.x)
3.0.7
3.7
2.2.7
Status: Resolved (was: Patch Available)
Thanks Mahdi,
The patch and tests looks good to me, committed as
{{39b86e3792721cfc8aeef639cfd4ac06c56288e8}}.
||branch||dtest||
|[11587-2.2|https://github.com/yukim/cassandra/tree/11587-2.2]|[dtest|http://cassci.datastax.com/view/Dev/view/yukim/job/yukim-11587-2.2-dtest/lastCompletedBuild/testReport/]|
|[11587-3.0|https://github.com/yukim/cassandra/tree/11587-3.0]|[dtest|http://cassci.datastax.com/view/Dev/view/yukim/job/yukim-11587-3.0-dtest/lastCompletedBuild/testReport/]|
|[11587-3.7|https://github.com/yukim/cassandra/tree/11587-3.7]|[dtest|http://cassci.datastax.com/view/Dev/view/yukim/job/yukim-11587-3.7-dtest/lastCompletedBuild/testReport/]|
> Cfstats estimate number of keys should return 0 for empty table
> ---------------------------------------------------------------
>
> Key: CASSANDRA-11587
> URL: https://issues.apache.org/jira/browse/CASSANDRA-11587
> Project: Cassandra
> Issue Type: Bug
> Components: Tools
> Environment: Cassandra 2.1.13
> Nodeltool
> Reporter: Jane Deng
> Assignee: Mahdi Mohammadi
> Priority: Trivial
> Labels: lhf
> Fix For: 2.2.7, 3.7, 3.0.7
>
>
> If sstable count is 0, the "estimate number of keys" in cfstats shows -1.
> {noformat}
> SSTable count: 0
> Number of keys (estimate): -1
> {noformat}
> 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.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)