cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject cassandra git commit: Fix bug in cardinality estimation when sstables are being compacted
Date Thu, 18 Jun 2015 18:46:10 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 83c0e01aa -> 42ea6e1f3


Fix bug in cardinality estimation when sstables are being compacted

patch by tjake; reviewed by benedict for CASSANDRA-9580


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

Branch: refs/heads/cassandra-2.1
Commit: 42ea6e1f3751845bd0d1326ab789a53a20783a53
Parents: 83c0e01
Author: T Jake Luciani <jake@apache.org>
Authored: Thu Jun 18 14:43:44 2015 -0400
Committer: T Jake Luciani <jake@apache.org>
Committed: Thu Jun 18 14:45:45 2015 -0400

----------------------------------------------------------------------
 CHANGES.txt                                                 | 1 +
 src/java/org/apache/cassandra/io/sstable/SSTableReader.java | 3 +++
 2 files changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/42ea6e1f/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 899ea7c..9ae0969 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.7
+ * Fix bug in cardinality check when compacting (CASSANDRA-9580)
  * Fix memory leak in Ref due to ConcurrentLinkedQueue.remove() behaviour (CASSANDRA-9549)
 Merged from 2.0
  * Expose some internals of SelectStatement for inspection (CASSANDRA-9532)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/42ea6e1f/src/java/org/apache/cassandra/io/sstable/SSTableReader.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/sstable/SSTableReader.java b/src/java/org/apache/cassandra/io/sstable/SSTableReader.java
index 0475665..0635826 100644
--- a/src/java/org/apache/cassandra/io/sstable/SSTableReader.java
+++ b/src/java/org/apache/cassandra/io/sstable/SSTableReader.java
@@ -264,6 +264,9 @@ public class SSTableReader extends SSTable implements SelfRefCounted<SSTableRead
             ICardinality cardinality = null;
             for (SSTableReader sstable : sstables)
             {
+                if (sstable.openReason == OpenReason.EARLY)
+                    continue;
+
                 try
                 {
                     CompactionMetadata metadata = (CompactionMetadata) sstable.descriptor.getMetadataSerializer().deserialize(sstable.descriptor,
MetadataType.COMPACTION);


Mime
View raw message