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/06/22 13:05:41 UTC

[1/3] cassandra git commit: Fix flakiness in RangeTombstoneTest

Repository: cassandra
Updated Branches:
  refs/heads/trunk 1af3c3b98 -> 51a9285e9


Fix flakiness in RangeTombstoneTest

patch by Ariel Weisberg; reviewed by Aleksey Yeschenko for
CASSANDRA-9523


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

Branch: refs/heads/trunk
Commit: 44c7bdec9ad2085db1c99230e49adfbd8eb2e0c9
Parents: 716b253
Author: Ariel Weisberg <ar...@weisberg.ws>
Authored: Fri Jun 5 13:02:20 2015 -0400
Committer: Aleksey Yeschenko <al...@apache.org>
Committed: Sat Jun 20 22:31:45 2015 +0300

----------------------------------------------------------------------
 .../org/apache/cassandra/db/RangeTombstoneTest.java     | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/44c7bdec/test/unit/org/apache/cassandra/db/RangeTombstoneTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/db/RangeTombstoneTest.java b/test/unit/org/apache/cassandra/db/RangeTombstoneTest.java
index 34e592a..9ce1236 100644
--- a/test/unit/org/apache/cassandra/db/RangeTombstoneTest.java
+++ b/test/unit/org/apache/cassandra/db/RangeTombstoneTest.java
@@ -26,6 +26,7 @@ import java.util.Set;
 import java.util.SortedSet;
 import java.util.TreeSet;
 import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Future;
 
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.Iterators;
@@ -572,7 +573,10 @@ public class RangeTombstoneTest
         {
             ColumnDefinition cd = new ColumnDefinition(cfs.metadata, indexedColumnName, Int32Type.instance, null, ColumnDefinition.Kind.REGULAR);
             cd.setIndex("test_index", IndexType.CUSTOM, ImmutableMap.of(SecondaryIndex.CUSTOM_INDEX_OPTION_NAME, TestIndex.class.getName()));
-            cfs.indexManager.addIndexedColumn(cd);
+            Future<?> rebuild = cfs.indexManager.addIndexedColumn(cd);
+            // If rebuild there is, wait for the rebuild to finish so it doesn't race with the following insertions
+            if (rebuild != null)
+                rebuild.get();
         }
 
         TestIndex index = ((TestIndex)cfs.indexManager.getIndexForColumn(indexedColumnName));
@@ -615,7 +619,11 @@ public class RangeTombstoneTest
         {
             ColumnDefinition cd = ColumnDefinition.regularDef(cfs.metadata, indexedColumnName, cfs.getComparator().asAbstractType(), 0)
                                                   .setIndex("test_index", IndexType.CUSTOM, ImmutableMap.of(SecondaryIndex.CUSTOM_INDEX_OPTION_NAME, TestIndex.class.getName()));
-            cfs.indexManager.addIndexedColumn(cd);
+            Future<?> rebuild = cfs.indexManager.addIndexedColumn(cd);
+            // If rebuild there is, wait for the rebuild to finish so it doesn't race with the following insertions
+            if (rebuild != null)
+                rebuild.get();
+
         }
 
         TestIndex index = ((TestIndex)cfs.indexManager.getIndexForColumn(indexedColumnName));


[3/3] cassandra git commit: Merge branch 'cassandra-2.2' into trunk

Posted by ma...@apache.org.
Merge branch 'cassandra-2.2' into trunk


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

Branch: refs/heads/trunk
Commit: 51a9285e9cd7966a7eb8215583060f684bb53e14
Parents: 1af3c3b 2deb68e
Author: Marcus Eriksson <ma...@apache.org>
Authored: Mon Jun 22 13:01:57 2015 +0200
Committer: Marcus Eriksson <ma...@apache.org>
Committed: Mon Jun 22 13:01:57 2015 +0200

----------------------------------------------------------------------
 CHANGES.txt                                             |  1 +
 .../org/apache/cassandra/tools/nodetool/Repair.java     | 10 ++++++++++
 .../org/apache/cassandra/db/RangeTombstoneTest.java     | 12 ++++++++++--
 3 files changed, 21 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/51a9285e/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index c631c8d,45727f9..188393f
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,15 -1,5 +1,16 @@@
 +3.0:
 + * Add nodetool command to replay batchlog (CASSANDRA-9547)
 + * Make file buffer cache independent of paths being read (CASSANDRA-8897)
 + * Remove deprecated legacy Hadoop code (CASSANDRA-9353)
 + * Decommissioned nodes will not rejoin the cluster (CASSANDRA-8801)
 + * Change gossip stabilization to use endpoit size (CASSANDRA-9401)
 + * Change default garbage collector to G1 (CASSANDRA-7486)
 + * Populate TokenMetadata early during startup (CASSANDRA-9317)
 + * undeprecate cache recentHitRate (CASSANDRA-6591)
 +
 +
  2.2
+  * Don't repair system_distributed by default (CASSANDRA-9621)
   * Fix mixing min, max, and count aggregates for blob type (CASSANRA-9622)
   * Rename class for DATE type in Java driver (CASSANDRA-9563)
   * Duplicate compilation of UDFs on coordinator (CASSANDRA-9475)


[2/3] cassandra git commit: Don't repair system_distributed by default

Posted by ma...@apache.org.
Don't repair system_distributed by default

Patch by marcuse; reviewed by slebresne for CASSANDRA-9621


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

Branch: refs/heads/trunk
Commit: 2deb68ede4b1eaf45eddaeb15e3af704daa1bbff
Parents: 44c7bde
Author: Marcus Eriksson <ma...@apache.org>
Authored: Mon Jun 22 09:55:05 2015 +0200
Committer: Marcus Eriksson <ma...@apache.org>
Committed: Mon Jun 22 12:59:57 2015 +0200

----------------------------------------------------------------------
 CHANGES.txt                                              |  1 +
 src/java/org/apache/cassandra/tools/nodetool/Repair.java | 10 ++++++++++
 2 files changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/2deb68ed/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 4886850..45727f9 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2
+ * Don't repair system_distributed by default (CASSANDRA-9621)
  * Fix mixing min, max, and count aggregates for blob type (CASSANRA-9622)
  * Rename class for DATE type in Java driver (CASSANDRA-9563)
  * Duplicate compilation of UDFs on coordinator (CASSANDRA-9475)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/2deb68ed/src/java/org/apache/cassandra/tools/nodetool/Repair.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/tools/nodetool/Repair.java b/src/java/org/apache/cassandra/tools/nodetool/Repair.java
index 45b3d98..7d0e207 100644
--- a/src/java/org/apache/cassandra/tools/nodetool/Repair.java
+++ b/src/java/org/apache/cassandra/tools/nodetool/Repair.java
@@ -27,8 +27,12 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
+
+import com.google.common.collect.Sets;
 
 import org.apache.cassandra.repair.RepairParallelism;
+import org.apache.cassandra.repair.SystemDistributedKeyspace;
 import org.apache.cassandra.repair.messages.RepairOption;
 import org.apache.cassandra.tools.NodeProbe;
 import org.apache.cassandra.tools.NodeTool.NodeToolCmd;
@@ -37,6 +41,8 @@ import org.apache.commons.lang3.StringUtils;
 @Command(name = "repair", description = "Repair one or more tables")
 public class Repair extends NodeToolCmd
 {
+    public final static Set<String> ONLY_EXPLICITLY_REPAIRED = Sets.newHashSet(SystemDistributedKeyspace.NAME);
+
     @Arguments(usage = "[<keyspace> <tables>...]", description = "The keyspace followed by one or many tables")
     private List<String> args = new ArrayList<>();
 
@@ -86,6 +92,10 @@ public class Repair extends NodeToolCmd
 
         for (String keyspace : keyspaces)
         {
+            // avoid repairing system_distributed by default (CASSANDRA-9621)
+            if ((args == null || args.isEmpty()) && ONLY_EXPLICITLY_REPAIRED.contains(keyspace))
+                continue;
+
             Map<String, String> options = new HashMap<>();
             RepairParallelism parallelismDegree = RepairParallelism.PARALLEL;
             if (sequential)