cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From marc...@apache.org
Subject [1/3] cassandra git commit: Don't try to get ancestors from half-renamed sstables
Date Tue, 27 Oct 2015 11:11:56 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.0 609497471 -> 95e16005e


Don't try to get ancestors from half-renamed sstables

Patch by marcuse; reviewed by yukim for CASSANDRA-10501


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

Branch: refs/heads/cassandra-3.0
Commit: 87f43ac51de7f34c2e65c5bb2e65d82393ea9442
Parents: 17082d4
Author: Marcus Eriksson <marcuse@apache.org>
Authored: Fri Oct 23 08:56:08 2015 +0200
Committer: Marcus Eriksson <marcuse@apache.org>
Committed: Tue Oct 27 12:06:22 2015 +0100

----------------------------------------------------------------------
 CHANGES.txt                                             | 1 +
 src/java/org/apache/cassandra/db/ColumnFamilyStore.java | 5 +++++
 2 files changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/87f43ac5/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index d06345e..2ca3b43 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.12
+ * Don't try to get ancestors from half-renamed sstables (CASSANDRA-10501)
  * Avoid repetition of JVM_OPTS in debian package (CASSANDRA-10251)
  * Fix potential NPE from handling result of SIM.highestSelectivityIndex (CASSANDRA-10550)
  * Fix paging issues with partitions containing only static columns data

http://git-wip-us.apache.org/repos/asf/cassandra/blob/87f43ac5/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index ffaa276..906e18c 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@ -646,6 +646,11 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean
         Set<Integer> completedAncestors = new HashSet<>();
         for (Map.Entry<Descriptor, Set<Component>> sstableFiles : directories.sstableLister().skipTemporary(true).list().entrySet())
         {
+            // we rename the Data component last - if it does not exist as a final file,
we should ignore this sstable and
+            // it will be removed during startup
+            if (!sstableFiles.getValue().contains(Component.DATA))
+                continue;
+
             Descriptor desc = sstableFiles.getKey();
 
             Set<Integer> ancestors;


Mime
View raw message