cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From marc...@apache.org
Subject [07/10] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0
Date Fri, 22 Jan 2016 06:35:10 GMT
Merge branch 'cassandra-2.2' into cassandra-3.0


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

Branch: refs/heads/trunk
Commit: 1e25d198343d23dfe98663dabba19dc2219ca7ba
Parents: a20b6ef 38dde32
Author: Marcus Eriksson <marcuse@apache.org>
Authored: Fri Jan 22 07:26:34 2016 +0100
Committer: Marcus Eriksson <marcuse@apache.org>
Committed: Fri Jan 22 07:26:34 2016 +0100

----------------------------------------------------------------------
 CHANGES.txt                                     |  2 ++
 .../db/compaction/LeveledManifest.java          | 34 ++++++++++++++------
 2 files changed, 26 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/1e25d198/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 89d34ec,751267e..1c2f2e2
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,27 -1,6 +1,29 @@@
 -2.2.5
 +3.0.3
 + * Update CQL documentation (CASSANDRA-10899)
 + * Check the column name, not cell name, for dropped columns when reading
 +   legacy sstables (CASSANDRA-11018)
 + * Don't attempt to index clustering values of static rows (CASSANDRA-11021)
 + * Remove checksum files after replaying hints (CASSANDRA-10947)
 + * Support passing base table metadata to custom 2i validation (CASSANDRA-10924)
 + * Ensure stale index entries are purged during reads (CASSANDRA-11013)
 + * Fix AssertionError when removing from list using UPDATE (CASSANDRA-10954)
 + * Fix UnsupportedOperationException when reading old sstable with range
 +   tombstone (CASSANDRA-10743)
 + * MV should use the maximum timestamp of the primary key (CASSANDRA-10910)
 + * Fix potential assertion error during compaction (CASSANDRA-10944)
 + * Fix counting of received sstables in streaming (CASSANDRA-10949)
 + * Implement hints compression (CASSANDRA-9428)
 + * Fix potential assertion error when reading static columns (CASSANDRA-10903)
 + * Avoid NoSuchElementException when executing empty batch (CASSANDRA-10711)
 + * Avoid building PartitionUpdate in toString (CASSANDRA-10897)
 + * Reduce heap spent when receiving many SSTables (CASSANDRA-10797)
 + * Add back support for 3rd party auth providers to bulk loader (CASSANDRA-10873)
 + * Eliminate the dependency on jgrapht for UDT resolution (CASSANDRA-10653)
 + * (Hadoop) Close Clusters and Sessions in Hadoop Input/Output classes (CASSANDRA-10837)
 + * Fix sstableloader not working with upper case keyspace name (CASSANDRA-10806)
 +Merged from 2.2:
+  * Start L0 STCS-compactions even if there is a L0 -> L1 compaction
+    going (CASSANDRA-10979)
   * Make UUID LSB unique per process (CASSANDRA-7925)
   * Avoid NPE when performing sstable tasks (scrub etc.) (CASSANDRA-10980)
   * Make sure client gets tombstone overwhelmed warning (CASSANDRA-9465)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/1e25d198/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
index b7bf83f,544b0a8..b0cd077
--- a/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
+++ b/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
@@@ -354,10 -348,30 +348,30 @@@ public class LeveledManifes
              return null;
          Collection<SSTableReader> candidates = getCandidatesFor(0);
          if (candidates.isEmpty())
-             return null;
+         {
+             // Since we don't have any other compactions to do, see if there is a STCS compaction
to perform in L0; if
+             // there is a long running compaction, we want to make sure that we continue
to keep the number of SSTables
+             // small in L0.
+             return getSTCSInL0CompactionCandidate();
+         }
 -        return new CompactionCandidate(candidates, getNextLevel(candidates), cfs.getCompactionStrategy().getMaxSSTableBytes());
 +        return new CompactionCandidate(candidates, getNextLevel(candidates), cfs.getCompactionStrategyManager().getMaxSSTableBytes());
      }
  
+     private CompactionCandidate getSTCSInL0CompactionCandidate()
+     {
+         if (!DatabaseDescriptor.getDisableSTCSInL0() && getLevel(0).size() >
MAX_COMPACTING_L0)
+         {
+             List<SSTableReader> mostInteresting = getSSTablesForSTCS(getLevel(0));
+             if (!mostInteresting.isEmpty())
+             {
+                 logger.debug("L0 is too far behind, performing size-tiering there first");
+                 return new CompactionCandidate(mostInteresting, 0, Long.MAX_VALUE);
+             }
+         }
+ 
+         return null;
+     }
+ 
      private List<SSTableReader> getSSTablesForSTCS(Collection<SSTableReader>
sstables)
      {
          Iterable<SSTableReader> candidates = cfs.getTracker().getUncompacting(sstables);


Mime
View raw message