cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbros...@apache.org
Subject cassandra git commit: only calculate getWriteableLocations once
Date Fri, 08 Jul 2016 23:30:21 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk ae4d705db -> cb9865c94


only calculate getWriteableLocations once


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

Branch: refs/heads/trunk
Commit: cb9865c940fbba1abdcc64d151ee79c22f6d3371
Parents: ae4d705
Author: Dave Brosius <dbrosius@mebigfatguy.com>
Authored: Fri Jul 8 19:30:04 2016 -0400
Committer: Dave Brosius <dbrosius@mebigfatguy.com>
Committed: Fri Jul 8 19:30:04 2016 -0400

----------------------------------------------------------------------
 .../cassandra/db/compaction/CompactionStrategyManager.java      | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/cb9865c9/src/java/org/apache/cassandra/db/compaction/CompactionStrategyManager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/compaction/CompactionStrategyManager.java b/src/java/org/apache/cassandra/db/compaction/CompactionStrategyManager.java
index b6d31d5..bf367a3 100644
--- a/src/java/org/apache/cassandra/db/compaction/CompactionStrategyManager.java
+++ b/src/java/org/apache/cassandra/db/compaction/CompactionStrategyManager.java
@@ -235,11 +235,10 @@ public class CompactionStrategyManager implements INotificationConsumer
         if (!cfs.getPartitioner().splitter().isPresent())
             return 0;
 
-        List<PartitionPosition> boundaries = StorageService.getDiskBoundaries(cfs,
locations.getWriteableLocations());
+        Directories.DataDirectory[] directories = locations.getWriteableLocations();
+        List<PartitionPosition> boundaries = StorageService.getDiskBoundaries(cfs,
directories);
         if (boundaries == null)
         {
-            Directories.DataDirectory[] directories = locations.getWriteableLocations();
-
             // try to figure out location based on sstable directory:
             for (int i = 0; i < directories.length; i++)
             {


Mime
View raw message