cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From marc...@apache.org
Subject [1/2] cassandra git commit: Avoid potential overlap in LCS with single-partition sstables
Date Fri, 08 May 2015 08:46:05 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 09ccf60ed -> e2ad784c7


Avoid potential overlap in LCS with single-partition sstables

Patch by marcuse; reviewed by yukim for CASSANDRA-9322


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

Branch: refs/heads/cassandra-2.1
Commit: 917068dcbfb9909b5f1695dc18e9a7b250264b42
Parents: 58de86b
Author: Marcus Eriksson <marcuse@apache.org>
Authored: Thu May 7 13:56:51 2015 +0200
Committer: Marcus Eriksson <marcuse@apache.org>
Committed: Fri May 8 10:40:15 2015 +0200

----------------------------------------------------------------------
 CHANGES.txt                                                      | 1 +
 src/java/org/apache/cassandra/db/compaction/LeveledManifest.java | 2 ++
 2 files changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/917068dc/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 8473777..1540d28 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.15:
+ * Avoid potential overlap in LCS with single-partition sstables (CASSANDRA-9322)
  * Log warning message when a table is queried before the schema has fully
    propagated (CASSANDRA-9136)
  * Overload SecondaryIndex#indexes to accept the column definition (CASSANDRA-9314)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/917068dc/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java b/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
index 867b5ce..81c65e4 100644
--- a/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
+++ b/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
@@ -353,6 +353,8 @@ public class LeveledManifest
                         if (max == null || candidate.last.compareTo(max) > 0)
                             max = candidate.last;
                     }
+                    if (min == null || max == null || min.equals(max)) // single partition
sstables - we cannot include a high level sstable.
+                        return candidates;
                     Set<SSTableReader> compacting = cfs.getDataTracker().getCompacting();
                     Range<RowPosition> boundaries = new Range<>(min, max);
                     for (SSTableReader sstable : getLevel(i))


Mime
View raw message