ColumnFamilyStore: getSSTableCountPerLevel should return null not empty array
When getSSTableCountPerLevel is called and the system is not using level compaction the expected return is null and not an empty array. This fix (scylla-jmx) Fixes #11 Signed-off-by: Amnon Heiman <amnon@scylladb.com>
This commit is contained in:
parent
e194ca85a4
commit
3a69e3d9da
@ -670,8 +670,14 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean {
|
||||
*/
|
||||
public int[] getSSTableCountPerLevel() {
|
||||
log(" getSSTableCountPerLevel()");
|
||||
return c.getIntArrValue(
|
||||
int[] res = c.getIntArrValue(
|
||||
"column_family/sstables/per_level/" + getCFName());
|
||||
if (res.length == 0) {
|
||||
// no sstable count
|
||||
// should return null
|
||||
return null;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user