cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject [1/2] cassandra git commit: Fix potential ClassCastException during upgrade
Date Wed, 14 Oct 2015 09:56:21 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk 1ad9914ad -> d16892a7d


Fix potential ClassCastException during upgrade

patch by slebresne; reviewed by blerer for CASSANDRA-10468

The exception was due to a type in BTreeRow that made us use an index
on the simple columns of a row when we meant to use the index on the
complex ones.


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

Branch: refs/heads/trunk
Commit: 26c88928598e9746ca5fd3cf3b0582ed4db6ea2a
Parents: 48889d2
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Tue Oct 13 10:39:28 2015 +0200
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Wed Oct 14 11:54:34 2015 +0200

----------------------------------------------------------------------
 CHANGES.txt                                         | 1 +
 src/java/org/apache/cassandra/db/rows/BTreeRow.java | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/26c88928/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 3b63714..84b85cf 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0-rc2
+ * Fix potential ClassCastException while upgrading (CASSANDRA-10468)
  * Fix NPE in MVs on update (CASSANDRA-10503)
  * Only include modified cell data in indexing deltas (CASSANDRA-10438)
  * Do not load keyspace when creating sstable writer (CASSANDRA-10443)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/26c88928/src/java/org/apache/cassandra/db/rows/BTreeRow.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/rows/BTreeRow.java b/src/java/org/apache/cassandra/db/rows/BTreeRow.java
index a2a8c5f..0d8eda8 100644
--- a/src/java/org/apache/cassandra/db/rows/BTreeRow.java
+++ b/src/java/org/apache/cassandra/db/rows/BTreeRow.java
@@ -464,7 +464,7 @@ public class BTreeRow extends AbstractRow
 
         private int getComplexIdx()
         {
-            return reversed ? data.length - simpleIdx - 1 : simpleIdx;
+            return reversed ? data.length - complexIdx - 1 : complexIdx;
         }
 
         private int getComplexIdxAndIncrement()


Mime
View raw message