Fix possible assertion triggered in SliceFromReadCommand patch by slebresne; reviewed by jbellis for CASSANDRA-5284
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/05709f74 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/05709f74 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/05709f74 Branch: refs/heads/trunk Commit: 05709f74eda7259f4dcc9cc909cee6f0b8b2dbe9 Parents: 3b98e63 Author: Sylvain Lebresne <sylv...@datastax.com> Authored: Tue Feb 26 10:58:05 2013 +0100 Committer: Sylvain Lebresne <sylv...@datastax.com> Committed: Tue Feb 26 10:58:05 2013 +0100 ---------------------------------------------------------------------- CHANGES.txt | 1 + .../apache/cassandra/db/SliceFromReadCommand.java | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/05709f74/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index 1fe1160..ff820fd 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -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 http://git-wip-us.apache.org/repos/asf/cassandra/blob/05709f74/src/java/org/apache/cassandra/db/SliceFromReadCommand.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/cassandra/db/SliceFromReadCommand.java b/src/java/org/apache/cassandra/db/SliceFromReadCommand.java index be73472..6aaa71e 100644 --- a/src/java/org/apache/cassandra/db/SliceFromReadCommand.java +++ b/src/java/org/apache/cassandra/db/SliceFromReadCommand.java @@ -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