Fix possible assertion triggered in SliceFromReadCommand

patch by slebresne; reviewed by jbellis for CASSANDRA-5284
This commit is contained in:
Sylvain Lebresne 2013-02-26 10:58:05 +01:00
parent 3b98e63ddb
commit 05709f74ed
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,7 @@
1.1.11
* cli: Add JMX authentication support (CASSANDRA-5080)
* nodetool: ability to repair specific range (CASSANDRA-5280)
* Fix possible assertion triggered in SliceFromReadCommand (CASSANDRA-5284)
1.1.10

View File

@ -75,10 +75,9 @@ public class SliceFromReadCommand extends ReadCommand
int maxLiveColumns = handler.getMaxLiveColumns();
int liveColumnsInRow = row != null ? row.getLiveColumnCount() : 0;
assert maxLiveColumns <= count;
// We generate a retry if at least one node reply with count live columns but after merge we have less
// than the total number of column we are interested in (which may be < count on a retry)
if ((maxLiveColumns == count) && (liveColumnsInRow < getOriginalRequestedCount()))
if ((maxLiveColumns >= count) && (liveColumnsInRow < getOriginalRequestedCount()))
{
// We asked t (= count) live columns and got l (=liveColumnsInRow) ones.
// From that, we can estimate that on this row, for x requested