You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by sa...@apache.org on 2017/05/10 10:35:36 UTC
[1/6] cassandra git commit: Avoid reading static row twice from
legacy sstables
Repository: cassandra
Updated Branches:
refs/heads/cassandra-3.0 0f118a93f -> 415d06b1d
refs/heads/cassandra-3.11 fbf14a5eb -> 025d9e62d
refs/heads/trunk 113ba2a53 -> bf1cd8eee
Avoid reading static row twice from legacy sstables
Patch by Sam Tunnicliffe; reviewed by Jeff Jirsa for CASSANDRA-13236
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/415d06b1
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/415d06b1
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/415d06b1
Branch: refs/heads/cassandra-3.0
Commit: 415d06b1da7062c48e735c1c20ded031fa0349d2
Parents: 0f118a9
Author: Sam Tunnicliffe <sa...@beobal.com>
Authored: Thu May 4 06:03:42 2017 -0700
Committer: Sam Tunnicliffe <sa...@beobal.com>
Committed: Wed May 10 10:03:51 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/415d06b1/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 17a11ab..2ef5863 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
3.0.14
+ * 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/415d06b1/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 d57e6bc..c61b6aa 100644
--- a/src/java/org/apache/cassandra/db/columniterator/AbstractSSTableIterator.java
+++ b/src/java/org/apache/cassandra/db/columniterator/AbstractSSTableIterator.java
@@ -29,6 +29,7 @@ import org.apache.cassandra.db.rows.*;
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.utils.ByteBufferUtil;
@@ -285,6 +286,7 @@ abstract class AbstractSSTableIterator implements SliceableUnfilteredRowIterator
{
private final boolean shouldCloseFile;
public FileDataInput file;
+ public final Version version;
protected UnfilteredDeserializer deserializer;
@@ -295,6 +297,7 @@ abstract class AbstractSSTableIterator implements SliceableUnfilteredRowIterator
{
this.file = file;
this.shouldCloseFile = shouldCloseFile;
+ this.version = sstable.descriptor.version;
if (file != null)
createDeserializer();
@@ -430,6 +433,19 @@ abstract class AbstractSSTableIterator implements SliceableUnfilteredRowIterator
currentIndexIdx = blockIdx;
reader.openMarker = blockIdx > 0 ? indexes.get(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)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org
[6/6] cassandra git commit: Merge branch 'cassandra-3.11' into trunk
Posted by sa...@apache.org.
Merge branch 'cassandra-3.11' into trunk
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/bf1cd8ee
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/bf1cd8ee
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/bf1cd8ee
Branch: refs/heads/trunk
Commit: bf1cd8eeec5c1f1daa72c24bd6abb77023a41130
Parents: 113ba2a 025d9e6
Author: Sam Tunnicliffe <sa...@beobal.com>
Authored: Wed May 10 11:32:39 2017 +0100
Committer: Sam Tunnicliffe <sa...@beobal.com>
Committed: Wed May 10 11:32:39 2017 +0100
----------------------------------------------------------------------
----------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org
[3/6] cassandra git commit: Avoid reading static row twice from
legacy sstables
Posted by sa...@apache.org.
Avoid reading static row twice from legacy sstables
Patch by Sam Tunnicliffe; reviewed by Jeff Jirsa for CASSANDRA-13236
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/415d06b1
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/415d06b1
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/415d06b1
Branch: refs/heads/trunk
Commit: 415d06b1da7062c48e735c1c20ded031fa0349d2
Parents: 0f118a9
Author: Sam Tunnicliffe <sa...@beobal.com>
Authored: Thu May 4 06:03:42 2017 -0700
Committer: Sam Tunnicliffe <sa...@beobal.com>
Committed: Wed May 10 10:03:51 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/415d06b1/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 17a11ab..2ef5863 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
3.0.14
+ * 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/415d06b1/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 d57e6bc..c61b6aa 100644
--- a/src/java/org/apache/cassandra/db/columniterator/AbstractSSTableIterator.java
+++ b/src/java/org/apache/cassandra/db/columniterator/AbstractSSTableIterator.java
@@ -29,6 +29,7 @@ import org.apache.cassandra.db.rows.*;
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.utils.ByteBufferUtil;
@@ -285,6 +286,7 @@ abstract class AbstractSSTableIterator implements SliceableUnfilteredRowIterator
{
private final boolean shouldCloseFile;
public FileDataInput file;
+ public final Version version;
protected UnfilteredDeserializer deserializer;
@@ -295,6 +297,7 @@ abstract class AbstractSSTableIterator implements SliceableUnfilteredRowIterator
{
this.file = file;
this.shouldCloseFile = shouldCloseFile;
+ this.version = sstable.descriptor.version;
if (file != null)
createDeserializer();
@@ -430,6 +433,19 @@ abstract class AbstractSSTableIterator implements SliceableUnfilteredRowIterator
currentIndexIdx = blockIdx;
reader.openMarker = blockIdx > 0 ? indexes.get(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)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org
[5/6] cassandra git commit: Merge branch 'cassandra-3.0' into
cassandra-3.11
Posted by sa...@apache.org.
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/cassandra-3.11
Commit: 025d9e62d29cef57b0ef994eded96e9187afca6c
Parents: fbf14a5 415d06b
Author: Sam Tunnicliffe <sa...@beobal.com>
Authored: Wed May 10 11:31:55 2017 +0100
Committer: Sam Tunnicliffe <sa...@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-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org
[2/6] cassandra git commit: Avoid reading static row twice from
legacy sstables
Posted by sa...@apache.org.
Avoid reading static row twice from legacy sstables
Patch by Sam Tunnicliffe; reviewed by Jeff Jirsa for CASSANDRA-13236
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/415d06b1
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/415d06b1
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/415d06b1
Branch: refs/heads/cassandra-3.11
Commit: 415d06b1da7062c48e735c1c20ded031fa0349d2
Parents: 0f118a9
Author: Sam Tunnicliffe <sa...@beobal.com>
Authored: Thu May 4 06:03:42 2017 -0700
Committer: Sam Tunnicliffe <sa...@beobal.com>
Committed: Wed May 10 10:03:51 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/415d06b1/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 17a11ab..2ef5863 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
3.0.14
+ * 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/415d06b1/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 d57e6bc..c61b6aa 100644
--- a/src/java/org/apache/cassandra/db/columniterator/AbstractSSTableIterator.java
+++ b/src/java/org/apache/cassandra/db/columniterator/AbstractSSTableIterator.java
@@ -29,6 +29,7 @@ import org.apache.cassandra.db.rows.*;
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.utils.ByteBufferUtil;
@@ -285,6 +286,7 @@ abstract class AbstractSSTableIterator implements SliceableUnfilteredRowIterator
{
private final boolean shouldCloseFile;
public FileDataInput file;
+ public final Version version;
protected UnfilteredDeserializer deserializer;
@@ -295,6 +297,7 @@ abstract class AbstractSSTableIterator implements SliceableUnfilteredRowIterator
{
this.file = file;
this.shouldCloseFile = shouldCloseFile;
+ this.version = sstable.descriptor.version;
if (file != null)
createDeserializer();
@@ -430,6 +433,19 @@ abstract class AbstractSSTableIterator implements SliceableUnfilteredRowIterator
currentIndexIdx = blockIdx;
reader.openMarker = blockIdx > 0 ? indexes.get(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)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org
[4/6] cassandra git commit: Merge branch 'cassandra-3.0' into
cassandra-3.11
Posted by sa...@apache.org.
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 <sa...@beobal.com>
Authored: Wed May 10 11:31:55 2017 +0100
Committer: Sam Tunnicliffe <sa...@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-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org