Merge branch 'cassandra-2.1' into cassandra-2.2

This commit is contained in:
Sam Tunnicliffe 2015-10-21 09:31:24 +01:00
commit f10d2ed955
3 changed files with 9 additions and 5 deletions

View File

@ -5,6 +5,7 @@
* Deprecate Pig support (CASSANDRA-10542)
* Reduce contention getting instances of CompositeType (CASSANDRA-10433)
Merged from 2.1:
* Fix potential NPE from handling result of SIM.highestSelectivityIndex (CASSANDRA-10550)
* Fix paging issues with partitions containing only static columns data (CASSANDRA-10381)
* Fix conditions on static columns (CASSANDRA-10264)
* AssertionError: attempted to delete non-existing file CommitLog (CASSANDRA-10377)

View File

@ -849,11 +849,14 @@ public class SecondaryIndexManager
for (SecondaryIndexSearcher searcher : indexSearchers)
{
SecondaryIndex highestSelectivityIndex = searcher.highestSelectivityIndex(clause);
long estimate = highestSelectivityIndex.estimateResultRows();
if (estimate <= bestEstimate)
if (highestSelectivityIndex != null)
{
bestEstimate = estimate;
mostSelective = searcher;
long estimate = highestSelectivityIndex.estimateResultRows();
if (estimate <= bestEstimate)
{
bestEstimate = estimate;
mostSelective = searcher;
}
}
}

View File

@ -1633,7 +1633,7 @@ public class StorageProxy implements StorageProxyMBean
{
// use our own mean column count as our estimate for how many matching rows each node will have
SecondaryIndex highestSelectivityIndex = searcher.highestSelectivityIndex(command.rowFilter);
resultRowsPerRange = Math.min(resultRowsPerRange, highestSelectivityIndex.estimateResultRows());
resultRowsPerRange = highestSelectivityIndex == null ? resultRowsPerRange : Math.min(resultRowsPerRange, highestSelectivityIndex.estimateResultRows());
}
}
}