You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by be...@apache.org on 2014/12/12 14:16:54 UTC

[1/2] cassandra git commit: Make read "defrag" async to reclaim memtables

Repository: cassandra
Updated Branches:
  refs/heads/trunk e2f35c767 -> f35e9c255


Make read "defrag" async to reclaim memtables

patch by benedict; reviewed by jbellis CASSANDRA-8459


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

Branch: refs/heads/trunk
Commit: 5c69584626f9137e8d737087c9518ae5efd3a618
Parents: 745ddd1
Author: Benedict Elliott Smith <be...@apache.org>
Authored: Fri Dec 12 13:16:10 2014 +0000
Committer: Benedict Elliott Smith <be...@apache.org>
Committed: Fri Dec 12 13:16:10 2014 +0000

----------------------------------------------------------------------
 CHANGES.txt                                         |  1 +
 .../apache/cassandra/db/CollationController.java    | 16 +++++++++++++---
 2 files changed, 14 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/5c695846/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 71a6642..b4cb6fb 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.3
+ * Make read "defrag" async to reclaim memtables (CASSANDRA-8459)
  * Remove tmplink files for offline compactions (CASSANDRA-8321)
  * Reduce maxHintsInProgress (CASSANDRA-8415)
  * BTree updates may call provided update function twice (CASSANDRA-8018)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/5c695846/src/java/org/apache/cassandra/db/CollationController.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/CollationController.java b/src/java/org/apache/cassandra/db/CollationController.java
index 1b22e70..4efcd9c 100644
--- a/src/java/org/apache/cassandra/db/CollationController.java
+++ b/src/java/org/apache/cassandra/db/CollationController.java
@@ -29,6 +29,8 @@ import com.google.common.collect.Iterables;
 import com.google.common.collect.Iterators;
 
 import net.nicoulaj.compilecommand.annotations.Inline;
+import org.apache.cassandra.concurrent.Stage;
+import org.apache.cassandra.concurrent.StageManager;
 import org.apache.cassandra.db.columniterator.OnDiskAtomIterator;
 import org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy;
 import org.apache.cassandra.db.composites.CellName;
@@ -152,10 +154,18 @@ public class CollationController
                 && !cfs.isAutoCompactionDisabled()
                 && cfs.getCompactionStrategy().shouldDefragment())
             {
+                // !!WARNING!!   if we stop copying our data to a heap-managed object,
+                //               we will need to track the lifetime of this mutation as well
                 Tracing.trace("Defragmenting requested data");
-                Mutation mutation = new Mutation(cfs.keyspace.getName(), filter.key.getKey(), returnCF.cloneMe());
-                // skipping commitlog and index updates is fine since we're just de-fragmenting existing data
-                Keyspace.open(mutation.getKeyspaceName()).apply(mutation, false, false);
+                final Mutation mutation = new Mutation(cfs.keyspace.getName(), filter.key.getKey(), returnCF.cloneMe());
+                StageManager.getStage(Stage.MUTATION).execute(new Runnable()
+                {
+                    public void run()
+                    {
+                        // skipping commitlog and index updates is fine since we're just de-fragmenting existing data
+                        Keyspace.open(mutation.getKeyspaceName()).apply(mutation, false, false);
+                    }
+                });
             }
 
             // Caller is responsible for final removeDeletedCF.  This is important for cacheRow to work correctly:


[2/2] cassandra git commit: Merge branch 'cassandra-2.1' into trunk

Posted by be...@apache.org.
Merge branch 'cassandra-2.1' into trunk


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

Branch: refs/heads/trunk
Commit: f35e9c25553108769466121010d5cb52f58c3cd6
Parents: e2f35c7 5c69584
Author: Benedict Elliott Smith <be...@apache.org>
Authored: Fri Dec 12 13:16:41 2014 +0000
Committer: Benedict Elliott Smith <be...@apache.org>
Committed: Fri Dec 12 13:16:41 2014 +0000

----------------------------------------------------------------------
 CHANGES.txt                                         |  1 +
 .../apache/cassandra/db/CollationController.java    | 16 +++++++++++++---
 2 files changed, 14 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f35e9c25/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 6ff61e7,b4cb6fb..93823c3
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,45 -1,5 +1,46 @@@
 +3.0
 + * Support for user-defined aggregation functions (CASSANDRA-8053)
 + * Fix NPE in SelectStatement with empty IN values (CASSANDRA-8419)
 + * Refactor SelectStatement, return IN results in natural order instead
 +   of IN value list order (CASSANDRA-7981)
 + * Support UDTs, tuples, and collections in user-defined
 +   functions (CASSANDRA-7563)
 + * Fix aggregate fn results on empty selection, result column name,
 +   and cqlsh parsing (CASSANDRA-8229)
 + * Mark sstables as repaired after full repair (CASSANDRA-7586)
 + * Extend Descriptor to include a format value and refactor reader/writer apis (CASSANDRA-7443)
 + * Integrate JMH for microbenchmarks (CASSANDRA-8151)
 + * Keep sstable levels when bootstrapping (CASSANDRA-7460)
 + * Add Sigar library and perform basic OS settings check on startup (CASSANDRA-7838)
 + * Support for aggregation functions (CASSANDRA-4914)
 + * Remove cassandra-cli (CASSANDRA-7920)
 + * Accept dollar quoted strings in CQL (CASSANDRA-7769)
 + * Make assassinate a first class command (CASSANDRA-7935)
 + * Support IN clause on any clustering column (CASSANDRA-4762)
 + * Improve compaction logging (CASSANDRA-7818)
 + * Remove YamlFileNetworkTopologySnitch (CASSANDRA-7917)
 + * Do anticompaction in groups (CASSANDRA-6851)
 + * Support pure user-defined functions (CASSANDRA-7395, 7526, 7562, 7740, 7781, 7929,
 +   7924, 7812, 8063, 7813)
 + * Permit configurable timestamps with cassandra-stress (CASSANDRA-7416)
 + * Move sstable RandomAccessReader to nio2, which allows using the
 +   FILE_SHARE_DELETE flag on Windows (CASSANDRA-4050)
 + * Remove CQL2 (CASSANDRA-5918)
 + * Add Thrift get_multi_slice call (CASSANDRA-6757)
 + * Optimize fetching multiple cells by name (CASSANDRA-6933)
 + * Allow compilation in java 8 (CASSANDRA-7028)
 + * Make incremental repair default (CASSANDRA-7250)
 + * Enable code coverage thru JaCoCo (CASSANDRA-7226)
 + * Switch external naming of 'column families' to 'tables' (CASSANDRA-4369) 
 + * Shorten SSTable path (CASSANDRA-6962)
 + * Use unsafe mutations for most unit tests (CASSANDRA-6969)
 + * Fix race condition during calculation of pending ranges (CASSANDRA-7390)
 + * Fail on very large batch sizes (CASSANDRA-8011)
 + * Improve concurrency of repair (CASSANDRA-6455, 8208)
 +
 +
  2.1.3
+  * Make read "defrag" async to reclaim memtables (CASSANDRA-8459)
   * Remove tmplink files for offline compactions (CASSANDRA-8321)
   * Reduce maxHintsInProgress (CASSANDRA-8415)
   * BTree updates may call provided update function twice (CASSANDRA-8018)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f35e9c25/src/java/org/apache/cassandra/db/CollationController.java
----------------------------------------------------------------------