cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sn...@apache.org
Subject [08/10] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0
Date Wed, 15 Jun 2016 09:48:54 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/70ee4ed4
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/70ee4ed4
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/70ee4ed4

Branch: refs/heads/cassandra-3.0
Commit: 70ee4ed49a01a6466f8156c69f383ebc1d3b0e29
Parents: 3c531cb c2566d1
Author: Robert Stupp <snazy@snazy.de>
Authored: Wed Jun 15 11:46:25 2016 +0200
Committer: Robert Stupp <snazy@snazy.de>
Committed: Wed Jun 15 11:46:25 2016 +0200

----------------------------------------------------------------------
 CHANGES.txt                                       |  1 +
 .../apache/cassandra/repair/RepairRunnable.java   |  7 ++++++-
 .../cassandra/service/ActiveRepairService.java    |  7 +++++--
 .../service/ActiveRepairServiceTest.java          | 18 ++++++++++--------
 4 files changed, 22 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/70ee4ed4/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 2c42c94,d9afaa3..3eb420d
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,30 -1,5 +1,31 @@@
 -2.2.7
 +3.0.8
 + * Add TimeWindowCompactionStrategy (CASSANDRA-9666)
 +Merged from 2.2:
   * StorageService shutdown hook should use a volatile variable (CASSANDRA-11984)
 +Merged from 2.1:
++ * Cache local ranges when calculating repair neighbors (CASSANDRA-11934)
 + * Allow LWT operation on static column with only partition keys (CASSANDRA-10532)
 + * Create interval tree over canonical sstables to avoid missing sstables during streaming
(CASSANDRA-11886)
 + * cqlsh COPY FROM: shutdown parent cluster after forking, to avoid corrupting SSL connections
(CASSANDRA-11749)
 +
 +
 +3.0.7
 + * Fix legacy serialization of Thrift-generated non-compound range tombstones
 +   when communicating with 2.x nodes (CASSANDRA-11930)
 + * Fix Directories instantiations where CFS.initialDirectories should be used (CASSANDRA-11849)
 + * Avoid referencing DatabaseDescriptor in AbstractType (CASSANDRA-11912)
 + * Fix sstables not being protected from removal during index build (CASSANDRA-11905)
 + * cqlsh: Suppress stack trace from Read/WriteFailures (CASSANDRA-11032)
 + * Remove unneeded code to repair index summaries that have
 +   been improperly down-sampled (CASSANDRA-11127)
 + * Avoid WriteTimeoutExceptions during commit log replay due to materialized
 +   view lock contention (CASSANDRA-11891)
 + * Prevent OOM failures on SSTable corruption, improve tests for corruption detection (CASSANDRA-9530)
 + * Use CFS.initialDirectories when clearing snapshots (CASSANDRA-11705)
 + * Allow compaction strategies to disable early open (CASSANDRA-11754)
 + * Refactor Materialized View code (CASSANDRA-11475)
 + * Update Java Driver (CASSANDRA-11615)
 +Merged from 2.2:
   * Persist local metadata earlier in startup sequence (CASSANDRA-11742)
   * Run CommitLog tests with different compression settings (CASSANDRA-9039)
   * cqlsh: fix tab completion for case-sensitive identifiers (CASSANDRA-11664)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/70ee4ed4/src/java/org/apache/cassandra/repair/RepairRunnable.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/repair/RepairRunnable.java
index 741cada,f92310b..21d0cd6
--- a/src/java/org/apache/cassandra/repair/RepairRunnable.java
+++ b/src/java/org/apache/cassandra/repair/RepairRunnable.java
@@@ -147,19 -146,22 +147,24 @@@ public class RepairRunnable extends Wra
          }
  
          final Set<InetAddress> allNeighbors = new HashSet<>();
 -        Map<Range, Set<InetAddress>> rangeToNeighbors = new HashMap<>();
 +        List<Pair<Set<InetAddress>, ? extends Collection<Range<Token>>>>
commonRanges = new ArrayList<>();
+ 
+         //pre-calculate output of getLocalRanges and pass it to getNeighbors to increase
performance and prevent
+         //calculation multiple times
+         Collection<Range<Token>> keyspaceLocalRanges = storageService.getLocalRanges(keyspace);
+ 
          try
          {
              for (Range<Token> range : options.getRanges())
              {
-                 Set<InetAddress> neighbors = ActiveRepairService.getNeighbors(keyspace,
range,
 -                    Set<InetAddress> neighbors = ActiveRepairService.getNeighbors(keyspace,
keyspaceLocalRanges,
 -                                                                                  range,
options.getDataCenters(),
 -                                                                                  options.getHosts());
 -                    rangeToNeighbors.put(range, neighbors);
 -                    allNeighbors.addAll(neighbors);
++                Set<InetAddress> neighbors = ActiveRepairService.getNeighbors(keyspace,
keyspaceLocalRanges, range,
 +                                                                              options.getDataCenters(),
 +                                                                              options.getHosts());
 +
 +                addRangeToNeighbors(commonRanges, range, neighbors);
 +                allNeighbors.addAll(neighbors);
              }
 +
              progress.incrementAndGet();
          }
          catch (IllegalArgumentException e)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/70ee4ed4/src/java/org/apache/cassandra/service/ActiveRepairService.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/service/ActiveRepairService.java
index 9f249e4,0bb7172..6b1fd83
--- a/src/java/org/apache/cassandra/service/ActiveRepairService.java
+++ b/src/java/org/apache/cassandra/service/ActiveRepairService.java
@@@ -182,7 -183,7 +183,9 @@@ public class ActiveRepairService implem
       *
       * @return neighbors with whom we share the provided range
       */
-     public static Set<InetAddress> getNeighbors(String keyspaceName, Range<Token>
toRepair, Collection<String> dataCenters, Collection<String> hosts)
 -    public static Set<InetAddress> getNeighbors(String keyspaceName, Collection<Range<Token>>
keyspaceLocalRanges, Range<Token> toRepair, Collection<String> dataCenters, Collection<String>
hosts)
++    public static Set<InetAddress> getNeighbors(String keyspaceName, Collection<Range<Token>>
keyspaceLocalRanges,
++                                                Range<Token> toRepair, Collection<String>
dataCenters,
++                                                Collection<String> hosts)
      {
          StorageService ss = StorageService.instance;
          Map<Range<Token>, List<InetAddress>> replicaSets = ss.getRangeToAddressMap(keyspaceName);

http://git-wip-us.apache.org/repos/asf/cassandra/blob/70ee4ed4/test/unit/org/apache/cassandra/service/ActiveRepairServiceTest.java
----------------------------------------------------------------------


Mime
View raw message