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: Cancel the transaction for sstables that we wont redistribute index summary for.
Date Thu, 10 Sep 2015 06:40:01 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk be7eb4a07 -> 33152d83c


Cancel the transaction for sstables that we wont redistribute index summary for.

Patch by marcuse; reviewed by benedict for CASSANDRA-10270


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

Branch: refs/heads/trunk
Commit: 813eb23576221179b3d66862302602dee10ae9ef
Parents: b2b7560
Author: Marcus Eriksson <marcuse@apache.org>
Authored: Wed Sep 9 14:08:10 2015 +0200
Committer: Marcus Eriksson <marcuse@apache.org>
Committed: Thu Sep 10 08:30:00 2015 +0200

----------------------------------------------------------------------
 CHANGES.txt                                                      | 2 ++
 .../org/apache/cassandra/io/sstable/IndexSummaryManager.java     | 4 ++++
 2 files changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/813eb235/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index d49ab3d..e1365b5 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,6 @@
 2.2.2
+ * Cancel transaction for sstables we wont redistribute index summary
+   for (CASSANDRA-10270)
  * Handle missing RoleManager in config after upgrade to 2.2 (CASSANDRA-10209) 
  * Retry snapshot deletion after compaction and gc on Windows (CASSANDRA-10222)
  * Fix failure to start with space in directory path on Windows (CASSANDRA-10239)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/813eb235/src/java/org/apache/cassandra/io/sstable/IndexSummaryManager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/sstable/IndexSummaryManager.java b/src/java/org/apache/cassandra/io/sstable/IndexSummaryManager.java
index 6f66fd3..b07b2f5 100644
--- a/src/java/org/apache/cassandra/io/sstable/IndexSummaryManager.java
+++ b/src/java/org/apache/cassandra/io/sstable/IndexSummaryManager.java
@@ -253,6 +253,7 @@ public class IndexSummaryManager implements IndexSummaryManagerMBean
     @VisibleForTesting
     public static List<SSTableReader> redistributeSummaries(List<SSTableReader>
compacting, Map<UUID, LifecycleTransaction> transactions, long memoryPoolBytes) throws
IOException
     {
+        logger.info("Redistributing index summaries");
         List<SSTableReader> oldFormatSSTables = new ArrayList<>();
         List<SSTableReader> redistribute = new ArrayList<>();
         for (LifecycleTransaction txn : transactions.values())
@@ -402,6 +403,7 @@ public class IndexSummaryManager implements IndexSummaryManagerMBean
                 logger.trace("SSTable {} is within thresholds of ideal sampling", sstable);
                 remainingSpace -= sstable.getIndexSummaryOffHeapSize();
                 newSSTables.add(sstable);
+                transactions.get(sstable.metadata.cfId).cancel(sstable);
             }
             totalReadsPerSec -= readsPerSec;
         }
@@ -411,6 +413,8 @@ public class IndexSummaryManager implements IndexSummaryManagerMBean
             Pair<List<SSTableReader>, List<ResampleEntry>> result = distributeRemainingSpace(toDownsample,
remainingSpace);
             toDownsample = result.right;
             newSSTables.addAll(result.left);
+            for (SSTableReader sstable : result.left)
+                transactions.get(sstable.metadata.cfId).cancel(sstable);
         }
 
         // downsample first, then upsample


Mime
View raw message