cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@apache.org
Subject [cassandra] branch cassandra-3.0 updated: Multiget Thrift query returns null records after digest mismatch
Date Tue, 02 Jul 2019 10:19:13 GMT
This is an automated email from the ASF dual-hosted git repository.

mck pushed a commit to branch cassandra-3.0
in repository https://gitbox.apache.org/repos/asf/cassandra.git


The following commit(s) were added to refs/heads/cassandra-3.0 by this push:
     new 97eae44  Multiget Thrift query returns null records after digest mismatch
97eae44 is described below

commit 97eae441dab742f0eaffcedc360991350232cfd6
Author: Benedict Elliott Smith <benedict@apache.org>
AuthorDate: Fri Dec 7 14:32:54 2018 +0000

    Multiget Thrift query returns null records after digest mismatch
    
    patch by Benedict; reviewed by Mick Semb Wever for CASSANDRA-14812
---
 CHANGES.txt                                                         | 1 +
 src/java/org/apache/cassandra/db/filter/DataLimits.java             | 6 ++++++
 src/java/org/apache/cassandra/db/partitions/PartitionIterators.java | 6 ++++--
 src/java/org/apache/cassandra/db/transform/BasePartitions.java      | 4 ++--
 4 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/CHANGES.txt b/CHANGES.txt
index d34406b..c891ce2 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.19
+ * Multiget thrift query returns null records after digest mismatch (CASSANDRA-14812)
  * Skipping illegal legacy cells can break reverse iteration of indexed partitions (CASSANDRA-15178)
  * Handle paging states serialized with a different version than the session's (CASSANDRA-15176)
  * Throw IOE instead of asserting on unsupporter peer versions (CASSANDRA-15066)
diff --git a/src/java/org/apache/cassandra/db/filter/DataLimits.java b/src/java/org/apache/cassandra/db/filter/DataLimits.java
index 46a1c6d..fa9d47a 100644
--- a/src/java/org/apache/cassandra/db/filter/DataLimits.java
+++ b/src/java/org/apache/cassandra/db/filter/DataLimits.java
@@ -67,6 +67,12 @@ public abstract class DataLimits
         {
             return iter;
         }
+
+        @Override
+        public PartitionIterator filter(PartitionIterator iter, int nowInSec, boolean countPartitionsWithOnlyStaticData,
boolean enforceStrictLiveness)
+        {
+            return iter;
+        }
     };
 
     // We currently deal with distinct queries by querying full partitions but limiting the
result at 1 row per
diff --git a/src/java/org/apache/cassandra/db/partitions/PartitionIterators.java b/src/java/org/apache/cassandra/db/partitions/PartitionIterators.java
index 9b7d7eb..a3cf746 100644
--- a/src/java/org/apache/cassandra/db/partitions/PartitionIterators.java
+++ b/src/java/org/apache/cassandra/db/partitions/PartitionIterators.java
@@ -21,6 +21,7 @@ import java.util.*;
 import java.security.MessageDigest;
 
 import org.apache.cassandra.db.EmptyIterators;
+import org.apache.cassandra.db.transform.FilteredPartitions;
 import org.apache.cassandra.db.transform.MorePartitions;
 import org.apache.cassandra.db.transform.Transformation;
 import org.apache.cassandra.utils.AbstractIterator;
@@ -67,7 +68,7 @@ public abstract class PartitionIterators
 
         class Extend implements MorePartitions<PartitionIterator>
         {
-            int i = 1;
+            int i = 0;
             public PartitionIterator moreContents()
             {
                 if (i >= iterators.size())
@@ -75,7 +76,8 @@ public abstract class PartitionIterators
                 return iterators.get(i++);
             }
         }
-        return MorePartitions.extend(iterators.get(0), new Extend());
+
+        return MorePartitions.extend(EmptyIterators.partition(), new Extend());
     }
 
     public static PartitionIterator singletonIterator(RowIterator iterator)
diff --git a/src/java/org/apache/cassandra/db/transform/BasePartitions.java b/src/java/org/apache/cassandra/db/transform/BasePartitions.java
index 2f76452..f6c486d 100644
--- a/src/java/org/apache/cassandra/db/transform/BasePartitions.java
+++ b/src/java/org/apache/cassandra/db/transform/BasePartitions.java
@@ -89,7 +89,7 @@ implements BasePartitionIterator<R>
                 Transformation[] fs = stack;
                 int len = length;
 
-                while (!stop.isSignalled && input.hasNext())
+                while (!stop.isSignalled && !stopChild.isSignalled && input.hasNext())
                 {
                     next = input.next();
                     for (int i = 0 ; next != null & i < len ; i++)
@@ -102,7 +102,7 @@ implements BasePartitionIterator<R>
                     }
                 }
 
-                if (stop.isSignalled || stopChild.isSignalled || !hasMoreContents())
+                if (stop.isSignalled || !hasMoreContents())
                     return false;
             }
             return true;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org


Mime
View raw message