Merge branch 'cassandra-3.0' into cassandra-3.11

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

Branch: refs/heads/trunk
Commit: 025d9e62d29cef57b0ef994eded96e9187afca6c
Parents: fbf14a5 415d06b
Author: Sam Tunnicliffe <s...@beobal.com>
Authored: Wed May 10 11:31:55 2017 +0100
Committer: Sam Tunnicliffe <s...@beobal.com>
Committed: Wed May 10 11:31:55 2017 +0100

----------------------------------------------------------------------
 CHANGES.txt                                         |  1 +
 .../db/columniterator/AbstractSSTableIterator.java  | 16 ++++++++++++++++
 2 files changed, 17 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/025d9e62/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index c66d11b,2ef5863..b8146af
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,36 -1,5 +1,37 @@@
 -3.0.14
 +3.11.0
 + * Forbid unsupported creation of SASI indexes over partition key columns 
(CASSANDRA-13228)
 + * Reject multiple values for a key in CQL grammar. (CASSANDRA-13369)
 + * UDA fails without input rows (CASSANDRA-13399)
 + * Fix compaction-stress by using daemonInitialization (CASSANDRA-13188)
 + * V5 protocol flags decoding broken (CASSANDRA-13443)
 + * Use write lock not read lock for removing sstables from compaction 
strategies. (CASSANDRA-13422)
 + * Use corePoolSize equal to maxPoolSize in JMXEnabledThreadPoolExecutors 
(CASSANDRA-13329)
 + * Avoid rebuilding SASI indexes containing no values (CASSANDRA-12962)
 + * Add charset to Analyser input stream (CASSANDRA-13151)
 + * Fix testLimitSSTables flake caused by concurrent flush (CASSANDRA-12820)
 + * cdc column addition strikes again (CASSANDRA-13382)
 + * Fix static column indexes (CASSANDRA-13277)
 + * DataOutputBuffer.asNewBuffer broken (CASSANDRA-13298)
 + * unittest CipherFactoryTest failed on MacOS (CASSANDRA-13370)
 + * Forbid SELECT restrictions and CREATE INDEX over non-frozen UDT columns 
(CASSANDRA-13247)
 + * Default logging we ship will incorrectly print "?:?" for "%F:%L" pattern 
(CASSANDRA-13317)
 + * Possible AssertionError in UnfilteredRowIteratorWithLowerBound 
(CASSANDRA-13366)
 + * Support unaligned memory access for AArch64 (CASSANDRA-13326)
 + * Improve SASI range iterator efficiency on intersection with an empty range 
(CASSANDRA-12915).
 + * Fix equality comparisons of columns using the duration type 
(CASSANDRA-13174)
 + * Obfuscate password in stress-graphs (CASSANDRA-12233)
 + * Move to FastThreadLocalThread and FastThreadLocal (CASSANDRA-13034)
 + * nodetool stopdaemon errors out (CASSANDRA-13030)
 + * Tables in system_distributed should not use gcgs of 0 (CASSANDRA-12954)
 + * Fix primary index calculation for SASI (CASSANDRA-12910)
 + * More fixes to the TokenAllocator (CASSANDRA-12990)
 + * NoReplicationTokenAllocator should work with zero replication factor 
(CASSANDRA-12983)
 + * Address message coalescing regression (CASSANDRA-12676)
 + * Delete illegal character from StandardTokenizerImpl.jflex (CASSANDRA-13417)
 + * Fix cqlsh automatic protocol downgrade regression (CASSANDRA-13307)
 + * Tracing payload not passed from QueryMessage to tracing session 
(CASSANDRA-12835)
 +Merged from 3.0:
+  * Avoid reading static row twice from old format sstables (CASSANDRA-13236)
   * Fix NPE in StorageService.excise() (CASSANDRA-13163)
   * Expire OutboundTcpConnection messages by a single Thread (CASSANDRA-13265)
   * Fail repair if insufficient responses received (CASSANDRA-13397)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/025d9e62/src/java/org/apache/cassandra/db/columniterator/AbstractSSTableIterator.java
----------------------------------------------------------------------
diff --cc 
src/java/org/apache/cassandra/db/columniterator/AbstractSSTableIterator.java
index f7e614a,c61b6aa..b6c60fe
--- 
a/src/java/org/apache/cassandra/db/columniterator/AbstractSSTableIterator.java
+++ 
b/src/java/org/apache/cassandra/db/columniterator/AbstractSSTableIterator.java
@@@ -26,15 -26,15 +26,16 @@@ import org.apache.cassandra.config.CFMe
  import org.apache.cassandra.db.*;
  import org.apache.cassandra.db.filter.ColumnFilter;
  import org.apache.cassandra.db.rows.*;
 +import org.apache.cassandra.io.sstable.IndexInfo;
  import org.apache.cassandra.io.sstable.format.SSTableReader;
  import org.apache.cassandra.io.sstable.CorruptSSTableException;
 -import org.apache.cassandra.io.sstable.IndexHelper;
+ import org.apache.cassandra.io.sstable.format.Version;
  import org.apache.cassandra.io.util.FileDataInput;
  import org.apache.cassandra.io.util.DataPosition;
 +import org.apache.cassandra.io.util.FileHandle;
  import org.apache.cassandra.utils.ByteBufferUtil;
  
 -abstract class AbstractSSTableIterator implements 
SliceableUnfilteredRowIterator
 +public abstract class AbstractSSTableIterator implements UnfilteredRowIterator
  {
      protected final SSTableReader sstable;
      protected final DecoratedKey key;
@@@ -494,13 -431,26 +497,26 @@@
              }
  
              currentIndexIdx = blockIdx;
 -            reader.openMarker = blockIdx > 0 ? indexes.get(blockIdx - 
1).endOpenMarker : null;
 +            reader.openMarker = blockIdx > 0 ? index(blockIdx - 
1).endOpenMarker : null;
              mark = reader.file.mark();
+ 
+             // If we're reading an old format file and we move to the first 
block in the index (i.e. the
+             // head of the partition), we skip the static row as it's already 
been read when we first opened
+             // the iterator. If we don't do this and a static row is present, 
we'll re-read it but treat it
+             // as a regular row, causing deserialization to blow up later as 
that row's flags will be invalid
+             // see CASSANDRA-12088 & CASSANDRA-13236
+             if (!reader.version.storeRows()
+                 && blockIdx == 0
+                 && reader.deserializer.hasNext()
+                 && reader.deserializer.nextIsStatic())
+             {
+                 reader.deserializer.skipNext();
+             }
          }
  
 -        private long columnOffset(int i)
 +        private long columnOffset(int i) throws IOException
          {
 -            return indexEntry.position + indexes.get(i).offset;
 +            return indexEntry.position + index(i).offset;
          }
  
          public int blocksCount()


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to