cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [3/3] git commit: fix indexing empty column values patch by jbellis for CASSANDRA-4832
Date Fri, 19 Oct 2012 22:44:07 GMT
fix indexing empty column values
patch by jbellis for CASSANDRA-4832


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

Branch: refs/heads/cassandra-1.1
Commit: 72dcc298d335721c053444249c157e9a6431ebea
Parents: 487c916
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Fri Oct 19 17:40:25 2012 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Fri Oct 19 17:42:53 2012 -0500

----------------------------------------------------------------------
 CHANGES.txt                                        |    1 +
 .../apache/cassandra/io/sstable/SSTableWriter.java |    3 +--
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/72dcc298/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 4b72e91..8822c3b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.1.7
+ * fix indexing empty column values (CASSANDRA-4832)
  * allow JdbcDate to compose null Date objects (CASSANDRA-4830)
  * fix possible stackoverflow when compacting 1000s of sstables
    (CASSANDRA-4765)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/72dcc298/src/java/org/apache/cassandra/io/sstable/SSTableWriter.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/sstable/SSTableWriter.java b/src/java/org/apache/cassandra/io/sstable/SSTableWriter.java
index 5a6ca38..31b03b8 100644
--- a/src/java/org/apache/cassandra/io/sstable/SSTableWriter.java
+++ b/src/java/org/apache/cassandra/io/sstable/SSTableWriter.java
@@ -129,8 +129,7 @@ public class SSTableWriter extends SSTable
      */
     private long beforeAppend(DecoratedKey<?> decoratedKey) throws IOException
     {
-        assert decoratedKey != null : "Keys must not be null";
-        assert decoratedKey.key.remaining() > 0 : "Keys must not be empty";
+        assert decoratedKey != null : "Keys must not be null"; // empty keys ARE allowed
b/c of indexed column values
         if (lastWrittenKey != null && lastWrittenKey.compareTo(decoratedKey) >=
0)
             throw new RuntimeException("Last written key " + lastWrittenKey + " >= current
key " + decoratedKey + " writing into " + getFilename());
         return (lastWrittenKey == null) ? 0 : dataFile.getFilePointer();


Mime
View raw message