cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject [1/3] cassandra git commit: Fix regression from CASSANDRA-10136
Date Tue, 20 Oct 2015 13:18:38 GMT
Repository: cassandra
Updated Branches:
  refs/heads/10360 [created] e3c5245a0


Fix regression from CASSANDRA-10136

When a read crossed a column index boundary (reading old sstable), we
have to mark the beginning of the index block and so we seek back
to said index block start, mark, and seek back to where we were to
continue reading. The problem was that the seekToPosition() method was
clearing the deserialization state which, in that case, is not what
we wanted.

The patch move the clearing out of the seek method and only call it
when that's actually what we want to do.


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

Branch: refs/heads/10360
Commit: 228b8020e5329de0b75f9dca9a6706b784afce26
Parents: fd5e474
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Fri Oct 16 13:47:40 2015 +0200
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Mon Oct 19 11:00:34 2015 +0200

----------------------------------------------------------------------
 .../cassandra/db/columniterator/AbstractSSTableIterator.java     | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/228b8020/src/java/org/apache/cassandra/db/columniterator/AbstractSSTableIterator.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/columniterator/AbstractSSTableIterator.java
b/src/java/org/apache/cassandra/db/columniterator/AbstractSSTableIterator.java
index 837f0a0..8900b31 100644
--- a/src/java/org/apache/cassandra/db/columniterator/AbstractSSTableIterator.java
+++ b/src/java/org/apache/cassandra/db/columniterator/AbstractSSTableIterator.java
@@ -323,7 +323,6 @@ abstract class AbstractSSTableIterator implements SliceableUnfilteredRowIterator
             else
             {
                 file.seek(position);
-                deserializer.clearState();
             }
         }
 
@@ -438,7 +437,10 @@ abstract class AbstractSSTableIterator implements SliceableUnfilteredRowIterator
         public void setToBlock(int blockIdx) throws IOException
         {
             if (blockIdx >= 0 && blockIdx < indexes.size())
+            {
                 reader.seekToPosition(columnOffset(blockIdx));
+                reader.deserializer.clearState();
+            }
 
             currentIndexIdx = blockIdx;
             reader.openMarker = blockIdx > 0 ? indexes.get(blockIdx - 1).endOpenMarker
: null;


Mime
View raw message