cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject [2/6] cassandra git commit: NullPointerException during compaction on table with static columns
Date Fri, 05 Aug 2016 13:03:46 GMT
NullPointerException during compaction on table with static columns

patch by Sylvain Lebresne; reviewed by Carl Yeksigian for CASSANDRA-12336


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

Branch: refs/heads/cassandra-3.9
Commit: b66e5a189674536903638b2028eaac23af85266b
Parents: cc8f6cc
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Fri Jul 29 12:36:40 2016 +0200
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Fri Aug 5 15:02:20 2016 +0200

----------------------------------------------------------------------
 CHANGES.txt                                                       | 1 +
 src/java/org/apache/cassandra/db/transform/BaseRows.java          | 3 ++-
 .../cassandra/cql3/validation/entities/StaticColumnsTest.java     | 2 ++
 3 files changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b66e5a18/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 49733d3..046c8b3 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.9
+ * NullPointerException during compaction on table with static columns (CASSANDRA-12336)
  * Fixed ConcurrentModificationException when reading metrics in GraphiteReporter (CASSANDRA-11823)
  * Fix upgrade of super columns on thrift (CASSANDRA-12335)
  * Fixed flacky BlacklistingCompactionsTest, switched to fixed size types and increased corruption
size (CASSANDRA-12359)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b66e5a18/src/java/org/apache/cassandra/db/transform/BaseRows.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/transform/BaseRows.java b/src/java/org/apache/cassandra/db/transform/BaseRows.java
index 7b0bb99..0586840 100644
--- a/src/java/org/apache/cassandra/db/transform/BaseRows.java
+++ b/src/java/org/apache/cassandra/db/transform/BaseRows.java
@@ -102,7 +102,8 @@ implements BaseRowIterator<R>
         super.add(transformation);
 
         // transform any existing data
-        staticRow = transformation.applyToStatic(staticRow);
+        if (staticRow != null)
+            staticRow = transformation.applyToStatic(staticRow);
         next = applyOne(next, transformation);
     }
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b66e5a18/test/unit/org/apache/cassandra/cql3/validation/entities/StaticColumnsTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/cql3/validation/entities/StaticColumnsTest.java
b/test/unit/org/apache/cassandra/cql3/validation/entities/StaticColumnsTest.java
index 75cbcc7..efa48ae 100644
--- a/test/unit/org/apache/cassandra/cql3/validation/entities/StaticColumnsTest.java
+++ b/test/unit/org/apache/cassandra/cql3/validation/entities/StaticColumnsTest.java
@@ -286,6 +286,8 @@ public class StaticColumnsTest extends CQLTester
 
         flush();
 
+        Thread.sleep(1000);
+
         compact();
 
         assertRows(execute("SELECT * FROM %s"), row("k1", "c1", null, "v1"));


Mime
View raw message