cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [07/10] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0
Date Mon, 20 Mar 2017 19:25:35 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/f4ba9083
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f4ba9083
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f4ba9083

Branch: refs/heads/trunk
Commit: f4ba9083e8251144d14cf367b8ef7d23c65ff2da
Parents: 0eebc6e 06316df
Author: Stefan Podkowinski <s.podkowinski@gmail.com>
Authored: Mon Mar 20 19:44:10 2017 +0100
Committer: Stefan Podkowinski <s.podkowinski@gmail.com>
Committed: Mon Mar 20 19:46:56 2017 +0100

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f4ba9083/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 10402f3,27dd343..6021315
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,26 -1,8 +1,27 @@@
 -2.2.10
 +3.0.13
 + * Fix CONTAINS filtering for null collections (CASSANDRA-13246)
 + * Applying: Use a unique metric reservoir per test run when using Cassandra-wide metrics
residing in MBeans (CASSANDRA-13216)
 + * Propagate row deletions in 2i tables on upgrade (CASSANDRA-13320)
 + * Slice.isEmpty() returns false for some empty slices (CASSANDRA-13305)
 + * Add formatted row output to assertEmpty in CQL Tester (CASSANDRA-13238)
 +Merged from 2.2:
+  * Don't anti-compact repaired data to avoid inconsistencies (CASSANDRA-13153)
   * Wrong logger name in AnticompactionTask (CASSANDRA-13343)
 + * Commitlog replay may fail if last mutation is within 4 bytes of end of segment (CASSANDRA-13282)
   * Fix queries updating multiple time the same list (CASSANDRA-13130)
   * Fix GRANT/REVOKE when keyspace isn't specified (CASSANDRA-13053)
 +
 +
 +3.0.12
 + * Prevent data loss on upgrade 2.1 - 3.0 by adding component separator to LogRecord absolute
path (CASSANDRA-13294)
 + * Improve testing on macOS by eliminating sigar logging (CASSANDRA-13233)
 + * Cqlsh copy-from should error out when csv contains invalid data for collections (CASSANDRA-13071)
 + * Update c.yaml doc for offheap memtables (CASSANDRA-13179)
 + * Faster StreamingHistogram (CASSANDRA-13038)
 + * Legacy deserializer can create unexpected boundary range tombstones (CASSANDRA-13237)
 + * Remove unnecessary assertion from AntiCompactionTest (CASSANDRA-13070)
 + * Fix cqlsh COPY for dates before 1900 (CASSANDRA-13185)
 +Merged from 2.2:
   * Avoid race on receiver by starting streaming sender thread after sending init message
(CASSANDRA-12886)
   * Fix "multiple versions of ant detected..." when running ant test (CASSANDRA-13232)
   * Coalescing strategy sleeps too much (CASSANDRA-13090)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f4ba9083/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/compaction/CompactionManager.java
index 28140e0,d21f1e8..8d470d5
--- a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
+++ b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
@@@ -22,7 -22,6 +22,8 @@@ import java.io.IOException
  import java.lang.management.ManagementFactory;
  import java.util.*;
  import java.util.concurrent.*;
 +import java.util.function.Predicate;
++import java.util.stream.Collectors;
  import javax.management.MBeanServer;
  import javax.management.ObjectName;
  import javax.management.openmbean.OpenDataException;
@@@ -1222,7 -1212,21 +1223,16 @@@ public class CompactionManager implemen
          logger.info("Performing anticompaction on {} sstables", repaired.originals().size());
  
          //Group SSTables
-         Collection<Collection<SSTableReader>> groupedSSTables = cfs.getCompactionStrategyManager().groupSSTablesForAntiCompaction(repaired.originals());
+         Set<SSTableReader> sstables = repaired.originals();
+ 
+         // Repairs can take place on both unrepaired (incremental + full) and repaired (full)
data.
+         // Although anti-compaction could work on repaired sstables as well and would result
in having more accurate
+         // repairedAt values for these, we still avoid anti-compacting already repaired
sstables, as we currently don't
+         // make use of any actual repairedAt value and splitting up sstables just for that
is not worth it at this point.
 -        Set<SSTableReader> unrepairedSSTables = ImmutableSet.copyOf(Iterables.filter(sstables,
new Predicate<SSTableReader>()
 -        {
 -            public boolean apply(SSTableReader input)
 -            {
 -                return !input.isRepaired();
 -            }
 -        }));
++        Set<SSTableReader> unrepairedSSTables = sstables.stream().filter((s) ->
!s.isRepaired()).collect(Collectors.toSet());
++
++        Collection<Collection<SSTableReader>> groupedSSTables = cfs.getCompactionStrategyManager().groupSSTablesForAntiCompaction(unrepairedSSTables);
+ 
 -        Collection<Collection<SSTableReader>> groupedSSTables = cfs.getCompactionStrategy().groupSSTablesForAntiCompaction(unrepairedSSTables);
          // iterate over sstables to check if the repaired / unrepaired ranges intersect
them.
          int antiCompactedSSTableCount = 0;
          for (Collection<SSTableReader> sstableGroup : groupedSSTables)


Mime
View raw message