You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by bl...@apache.org on 2016/03/10 12:01:17 UTC

[1/2] cassandra git commit: Fix paging for IN queries on tables without clustering columns

Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.5 96a6e2e5f -> 47a2d48a0


Fix paging for IN queries on tables without clustering columns

patch by Benjamin Lerer; reviewed by Sylvain Lebresne for CASSANDRA-11208


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/60b23b12
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/60b23b12
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/60b23b12

Branch: refs/heads/cassandra-3.5
Commit: 60b23b1252e600189d11c614d971a4c2c3055edc
Parents: 7a5f8b1
Author: Benjamin Lerer <b....@gmail.com>
Authored: Thu Mar 10 11:50:03 2016 +0100
Committer: Benjamin Lerer <b....@gmail.com>
Committed: Thu Mar 10 11:50:03 2016 +0100

----------------------------------------------------------------------
 CHANGES.txt                                                   | 1 +
 .../apache/cassandra/service/pager/AbstractQueryPager.java    | 7 +++++--
 src/java/org/apache/cassandra/service/pager/PagingState.java  | 2 +-
 3 files changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/60b23b12/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 5efb1b0..864a33d 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.5
+ * Fix paging for IN queries on tables without clustering columns (CASSANDRA-11208)
  * Remove recursive call from CompositesSearcher (CASSANDRA-11304)
  * Fix filtering on non-primary key columns for queries without index (CASSANDRA-6377)
  * Fix sstableloader fail when using materialized view (CASSANDRA-11275)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/60b23b12/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java b/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java
index 2599b8d..48f6c04 100644
--- a/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java
+++ b/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java
@@ -124,8 +124,11 @@ abstract class AbstractQueryPager implements QueryPager
             int counted = counter.counted();
             remaining -= counted;
             // If the clustering of the last row returned is a static one, it means that the partition was only
-            // containing data within the static columns. Therefore, there are not data remaining within the partition.
-            if (lastRow != null && lastRow.clustering() == Clustering.STATIC_CLUSTERING)
+            // containing data within the static columns. If the clustering of the last row returned is empty
+            // it means that there is only one row per partition. Therefore, in both cases there are no data remaining
+            // within the partition.
+            if (lastRow != null && (lastRow.clustering() == Clustering.STATIC_CLUSTERING
+                    || lastRow.clustering() == Clustering.EMPTY))
             {
                 remainingInPartition = 0;
             }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/60b23b12/src/java/org/apache/cassandra/service/pager/PagingState.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/pager/PagingState.java b/src/java/org/apache/cassandra/service/pager/PagingState.java
index d495f9d..611523f 100644
--- a/src/java/org/apache/cassandra/service/pager/PagingState.java
+++ b/src/java/org/apache/cassandra/service/pager/PagingState.java
@@ -162,7 +162,7 @@ public class PagingState
     public String toString()
     {
         return String.format("PagingState(key=%s, cellname=%s, remaining=%d, remainingInPartition=%d",
-                             ByteBufferUtil.bytesToHex(partitionKey),
+                             partitionKey != null ? ByteBufferUtil.bytesToHex(partitionKey) : null,
                              rowMark,
                              remaining,
                              remainingInPartition);


[2/2] cassandra git commit: Merge branch cassandra-3.0 into cassandra-3.5

Posted by bl...@apache.org.
Merge branch cassandra-3.0 into cassandra-3.5


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/47a2d48a
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/47a2d48a
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/47a2d48a

Branch: refs/heads/cassandra-3.5
Commit: 47a2d48a0690ab66ad43b752f3e1d1814b5e7f1e
Parents: 96a6e2e 60b23b1
Author: Benjamin Lerer <b....@gmail.com>
Authored: Thu Mar 10 12:00:42 2016 +0100
Committer: Benjamin Lerer <b....@gmail.com>
Committed: Thu Mar 10 12:00:42 2016 +0100

----------------------------------------------------------------------
 CHANGES.txt                                                   | 2 ++
 .../apache/cassandra/service/pager/AbstractQueryPager.java    | 7 +++++--
 src/java/org/apache/cassandra/service/pager/PagingState.java  | 2 +-
 3 files changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/47a2d48a/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index ff67a2b,864a33d..58c7ed0
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,5 -1,6 +1,7 @@@
 -3.0.5
 +3.5
 +Merged from 3.0:
+  * Fix paging for IN queries on tables without clustering columns (CASSANDRA-11208)
+  * Remove recursive call from CompositesSearcher (CASSANDRA-11304)
   * Fix filtering on non-primary key columns for queries without index (CASSANDRA-6377)
   * Fix sstableloader fail when using materialized view (CASSANDRA-11275)
  Merged from 2.2:

http://git-wip-us.apache.org/repos/asf/cassandra/blob/47a2d48a/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java
----------------------------------------------------------------------