cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject [1/6] cassandra git commit: fixing Directories instantiations where CFS.initialDirectories should be used
Date Wed, 01 Jun 2016 20:11:46 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.0 6932bbd90 -> 7eb464734
  refs/heads/cassandra-3.7 c7e086d61 -> dbf03103c
  refs/heads/trunk 49a2da9b7 -> 59949ac38


fixing Directories instantiations where CFS.initialDirectories should be used

Patch by Blake Eggleston; reviewed by tjake for CASSANDRA-11849


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

Branch: refs/heads/cassandra-3.0
Commit: 7eb464734b0732ab3c6cd2a5c3409085c81f95a7
Parents: 6932bbd
Author: Blake Eggleston <bdeggleston@gmail.com>
Authored: Wed May 25 09:09:22 2016 -0700
Committer: T Jake Luciani <jake@apache.org>
Committed: Wed Jun 1 15:54:07 2016 -0400

----------------------------------------------------------------------
 CHANGES.txt                                                    | 1 +
 src/java/org/apache/cassandra/db/ColumnFamilyStore.java        | 2 +-
 src/java/org/apache/cassandra/db/lifecycle/LogTransaction.java | 3 ++-
 src/java/org/apache/cassandra/tools/StandaloneSSTableUtil.java | 3 ++-
 4 files changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/7eb46473/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index a59dff1..0cafa83 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.7
+ * Fix Directories instantiations where CFS.initialDirectories should be used (CASSANDRA-11849)
  * Avoid referencing DatabaseDescriptor in AbstractType (CASSANDRA-11912)
  * Fix sstables not being protected from removal during index build (CASSANDRA-11905)
  * cqlsh: Suppress stack trace from Read/WriteFailures (CASSANDRA-11032)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7eb46473/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 7ca6d96..3264327 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@ -580,7 +580,7 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean
      */
     public static void scrubDataDirectories(CFMetaData metadata)
     {
-        Directories directories = new Directories(metadata);
+        Directories directories = new Directories(metadata, initialDirectories);
 
          // clear ephemeral snapshots that were not properly cleared last session (CASSANDRA-7357)
         clearEphemeralSnapshots(directories);

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7eb46473/src/java/org/apache/cassandra/db/lifecycle/LogTransaction.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/lifecycle/LogTransaction.java b/src/java/org/apache/cassandra/db/lifecycle/LogTransaction.java
index ce76165..b34ca60 100644
--- a/src/java/org/apache/cassandra/db/lifecycle/LogTransaction.java
+++ b/src/java/org/apache/cassandra/db/lifecycle/LogTransaction.java
@@ -32,6 +32,7 @@ import org.slf4j.LoggerFactory;
 
 import org.apache.cassandra.concurrent.ScheduledExecutors;
 import org.apache.cassandra.config.CFMetaData;
+import org.apache.cassandra.db.ColumnFamilyStore;
 import org.apache.cassandra.db.Directories;
 import org.apache.cassandra.db.SystemKeyspace;
 import org.apache.cassandra.db.compaction.OperationType;
@@ -385,7 +386,7 @@ class LogTransaction extends Transactional.AbstractTransactional implements
Tran
      */
     static void removeUnfinishedLeftovers(CFMetaData metadata)
     {
-        removeUnfinishedLeftovers(new Directories(metadata).getCFDirectories());
+        removeUnfinishedLeftovers(new Directories(metadata, ColumnFamilyStore.getInitialDirectories()).getCFDirectories());
     }
 
     @VisibleForTesting

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7eb46473/src/java/org/apache/cassandra/tools/StandaloneSSTableUtil.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/tools/StandaloneSSTableUtil.java b/src/java/org/apache/cassandra/tools/StandaloneSSTableUtil.java
index 6e2be1d..7aa07d0 100644
--- a/src/java/org/apache/cassandra/tools/StandaloneSSTableUtil.java
+++ b/src/java/org/apache/cassandra/tools/StandaloneSSTableUtil.java
@@ -20,6 +20,7 @@ package org.apache.cassandra.tools;
 
 import org.apache.cassandra.config.CFMetaData;
 import org.apache.cassandra.config.Schema;
+import org.apache.cassandra.db.ColumnFamilyStore;
 import org.apache.cassandra.db.Directories;
 import org.apache.cassandra.db.lifecycle.LifecycleTransaction;
 import org.apache.cassandra.utils.OutputHandler;
@@ -81,7 +82,7 @@ public class StandaloneSSTableUtil
 
     private static void listFiles(Options options, CFMetaData metadata, OutputHandler handler)
throws IOException
     {
-        Directories directories = new Directories(metadata);
+        Directories directories = new Directories(metadata, ColumnFamilyStore.getInitialDirectories());
 
         for (File dir : directories.getCFDirectories())
         {


Mime
View raw message