cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject git commit: Fix small bug introduced by #2319
Date Thu, 15 Mar 2012 14:25:23 GMT
Updated Branches:
  refs/heads/trunk 845f40733 -> 65c33fac9


Fix small bug introduced by #2319


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

Branch: refs/heads/trunk
Commit: 65c33fac9c974fe93b617cc8f3e77c929733df21
Parents: 845f407
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Thu Mar 15 15:24:45 2012 +0100
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Thu Mar 15 15:24:45 2012 +0100

----------------------------------------------------------------------
 .../io/sstable/SSTableIdentityIterator.java        |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/65c33fac/src/java/org/apache/cassandra/io/sstable/SSTableIdentityIterator.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/sstable/SSTableIdentityIterator.java b/src/java/org/apache/cassandra/io/sstable/SSTableIdentityIterator.java
index f5895a2..f22cb2e 100644
--- a/src/java/org/apache/cassandra/io/sstable/SSTableIdentityIterator.java
+++ b/src/java/org/apache/cassandra/io/sstable/SSTableIdentityIterator.java
@@ -82,13 +82,15 @@ public class SSTableIdentityIterator implements Comparable<SSTableIdentityIterat
         this(sstable.metadata, file, key, dataStart, dataSize, checkData, sstable, IColumnSerializer.Flag.LOCAL);
     }
 
+    // Must only be used against current file format
     public SSTableIdentityIterator(CFMetaData metadata, DataInput file, DecoratedKey key,
long dataStart, long dataSize, IColumnSerializer.Flag flag)
     throws IOException
     {
         this(metadata, file, key, dataStart, dataSize, false, null, flag);
     }
 
-    // sstable may be null *if* deserializeRowHeader is false
+    // sstable may be null *if* checkData is false
+    // If it is null, we assume the data is in the current file format
     private SSTableIdentityIterator(CFMetaData metadata, DataInput input, DecoratedKey key,
long dataStart, long dataSize, boolean checkData, SSTableReader sstable, IColumnSerializer.Flag
flag)
     throws IOException
     {
@@ -137,7 +139,7 @@ public class SSTableIdentityIterator implements Comparable<SSTableIdentityIterat
                 }
             }
 
-            if (!sstable.descriptor.hasPromotedIndexes)
+            if (sstable != null && !sstable.descriptor.hasPromotedIndexes)
             {
                 IndexHelper.skipBloomFilter(inputWithTracker);
                 IndexHelper.skipIndex(inputWithTracker);


Mime
View raw message