You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by ma...@apache.org on 2015/03/23 09:33:17 UTC

[1/2] cassandra git commit: Check for overlap with non-early opened files in LCS

Repository: cassandra
Updated Branches:
  refs/heads/trunk 6633421dd -> bee474626


Check for overlap with non-early opened files in LCS

patch by marcuse; reviewed by carlyeks for CASSANDRA-8739


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

Branch: refs/heads/trunk
Commit: ff14d7ab8d66c7665d0a5d6c87fb8efac35b0d13
Parents: fd0bdef
Author: Marcus Eriksson <ma...@apache.org>
Authored: Thu Feb 5 13:43:31 2015 +0100
Committer: Marcus Eriksson <ma...@apache.org>
Committed: Mon Mar 23 09:24:38 2015 +0100

----------------------------------------------------------------------
 CHANGES.txt                                         |  1 +
 .../cassandra/db/compaction/LeveledManifest.java    | 16 +++++++++++++++-
 2 files changed, 16 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/ff14d7ab/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 25b0a06..924bdcf 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.4
+ * Check for overlap with non-early sstables in LCS (CASSANDRA-8739)
  * Only calculate max purgable timestamp if we have to (CASSANDRA-8914)
  * (cqlsh) Greatly improve performance of COPY FROM (CASSANDRA-8225)
  * IndexSummary effectiveIndexInterval is now a guideline, not a rule (CASSANDRA-8993)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ff14d7ab/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java b/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
index c076a64..ecebfe0 100644
--- a/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
+++ b/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
@@ -534,7 +534,7 @@ public class LeveledManifest
 
         if (level == 0)
         {
-            Set<SSTableReader> compactingL0 = ImmutableSet.copyOf(Iterables.filter(getLevel(0), Predicates.in(compacting)));
+            Set<SSTableReader> compactingL0 = getCompacting(0);
 
             RowPosition lastCompactingKey = null;
             RowPosition firstCompactingKey = null;
@@ -595,6 +595,8 @@ public class LeveledManifest
                 Set<SSTableReader> l1overlapping = overlapping(candidates, getLevel(1));
                 if (Sets.intersection(l1overlapping, compacting).size() > 0)
                     return Collections.emptyList();
+                if (!overlapping(candidates, compactingL0).isEmpty())
+                    return Collections.emptyList();
                 candidates = Sets.union(candidates, l1overlapping);
             }
             if (candidates.size() < 2)
@@ -632,6 +634,18 @@ public class LeveledManifest
         return Collections.emptyList();
     }
 
+    private Set<SSTableReader> getCompacting(int level)
+    {
+        Set<SSTableReader> sstables = new HashSet<>();
+        Set<SSTableReader> levelSSTables = new HashSet<>(getLevel(level));
+        for (SSTableReader sstable : cfs.getDataTracker().getCompacting())
+        {
+            if (levelSSTables.contains(sstable))
+                sstables.add(sstable);
+        }
+        return sstables;
+    }
+
     private List<SSTableReader> ageSortedSSTables(Collection<SSTableReader> candidates)
     {
         List<SSTableReader> ageSortedCandidates = new ArrayList<SSTableReader>(candidates);


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

Posted by ma...@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/bee47462
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/bee47462
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/bee47462

Branch: refs/heads/trunk
Commit: bee474626f71f7abe38e82b4fcdf3abdabadd29a
Parents: 6633421 ff14d7a
Author: Marcus Eriksson <ma...@apache.org>
Authored: Mon Mar 23 09:28:26 2015 +0100
Committer: Marcus Eriksson <ma...@apache.org>
Committed: Mon Mar 23 09:28:26 2015 +0100

----------------------------------------------------------------------
 CHANGES.txt                                         |  1 +
 .../cassandra/db/compaction/LeveledManifest.java    | 16 +++++++++++++++-
 2 files changed, 16 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/bee47462/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 4c3ef62,924bdcf..68df3e6
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,78 -1,5 +1,79 @@@
 +3.0
 + * Partition intra-cluster message streams by size, not type (CASSANDRA-8789)
 + * Add WriteFailureException to native protocol, notify coordinator of
 +   write failures (CASSANDRA-8592)
 + * Convert SequentialWriter to nio (CASSANDRA-8709)
 + * Add role based access control (CASSANDRA-7653, 8650, 7216, 8760, 8849, 8761, 8850)
 + * Record client ip address in tracing sessions (CASSANDRA-8162)
 + * Indicate partition key columns in response metadata for prepared
 +   statements (CASSANDRA-7660)
 + * Merge UUIDType and TimeUUIDType parse logic (CASSANDRA-8759)
 + * Avoid memory allocation when searching index summary (CASSANDRA-8793)
 + * Optimise (Time)?UUIDType Comparisons (CASSANDRA-8730)
 + * Make CRC32Ex into a separate maven dependency (CASSANDRA-8836)
 + * Use preloaded jemalloc w/ Unsafe (CASSANDRA-8714)
 + * Avoid accessing partitioner through StorageProxy (CASSANDRA-8244, 8268)
 + * Upgrade Metrics library and remove depricated metrics (CASSANDRA-5657)
 + * Serializing Row cache alternative, fully off heap (CASSANDRA-7438)
 + * Duplicate rows returned when in clause has repeated values (CASSANDRA-6707)
 + * Make CassandraException unchecked, extend RuntimeException (CASSANDRA-8560)
 + * Support direct buffer decompression for reads (CASSANDRA-8464)
 + * DirectByteBuffer compatible LZ4 methods (CASSANDRA-7039)
 + * Group sstables for anticompaction correctly (CASSANDRA-8578)
 + * Add ReadFailureException to native protocol, respond
 +   immediately when replicas encounter errors while handling
 +   a read request (CASSANDRA-7886)
 + * Switch CommitLogSegment from RandomAccessFile to nio (CASSANDRA-8308)
 + * Allow mixing token and partition key restrictions (CASSANDRA-7016)
 + * Support index key/value entries on map collections (CASSANDRA-8473)
 + * Modernize schema tables (CASSANDRA-8261)
 + * 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 and ignore duplicate values in partition key IN restrictions (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 partition key column (CASSANDRA-7855)
 + * 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 user-defined functions (CASSANDRA-7395, 7526, 7562, 7740, 7781, 7929,
 +   7924, 7812, 8063, 7813, 7708)
 + * 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)
 + * Select optimal CRC32 implementation at runtime (CASSANDRA-8614)
 + * Evaluate MurmurHash of Token once per query (CASSANDRA-7096)
 + * Generalize progress reporting (CASSANDRA-8901)
 + * Resumable bootstrap streaming (CASSANDRA-8838)
 +
  2.1.4
+  * Check for overlap with non-early sstables in LCS (CASSANDRA-8739)
   * Only calculate max purgable timestamp if we have to (CASSANDRA-8914)
   * (cqlsh) Greatly improve performance of COPY FROM (CASSANDRA-8225)
   * IndexSummary effectiveIndexInterval is now a guideline, not a rule (CASSANDRA-8993)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/bee47462/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
index 8f136e2,ecebfe0..1051595
--- a/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
+++ b/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
@@@ -643,9 -634,21 +645,21 @@@ public class LeveledManifes
          return Collections.emptyList();
      }
  
+     private Set<SSTableReader> getCompacting(int level)
+     {
+         Set<SSTableReader> sstables = new HashSet<>();
+         Set<SSTableReader> levelSSTables = new HashSet<>(getLevel(level));
+         for (SSTableReader sstable : cfs.getDataTracker().getCompacting())
+         {
+             if (levelSSTables.contains(sstable))
+                 sstables.add(sstable);
+         }
+         return sstables;
+     }
+ 
      private List<SSTableReader> ageSortedSSTables(Collection<SSTableReader> candidates)
      {
 -        List<SSTableReader> ageSortedCandidates = new ArrayList<SSTableReader>(candidates);
 +        List<SSTableReader> ageSortedCandidates = new ArrayList<>(candidates);
          Collections.sort(ageSortedCandidates, SSTableReader.maxTimestampComparator);
          return ageSortedCandidates;
      }