You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2020/10/13 23:28:32 UTC

[GitHub] [cassandra] maedhroz commented on a change in pull request #776: CASSANDRA-16209 Log Warning Rather than Verbose Trace when Preview Repair Validation Conflicts with Incremental Repair

maedhroz commented on a change in pull request #776:
URL: https://github.com/apache/cassandra/pull/776#discussion_r504315211



##########
File path: test/distributed/org/apache/cassandra/distributed/test/PreviewRepairTest.java
##########
@@ -158,6 +172,66 @@ public void testFinishingIncRepairDuringPreview() throws IOException, Interrupte
         }
     }
 
+    /**
+     * Tests that a IR is running, but not completed before validation compaction starts
+     */
+    @Test
+    public void testConcurrentIncRepairDuringPreview() throws IOException, InterruptedException, ExecutionException
+    {
+        try (Cluster cluster = init(Cluster.build(2).withConfig(config ->
+                                                                config.set("disable_incremental_repair", false)
+                                                                      .with(GOSSIP)
+                                                                      .with(NETWORK)).start()))
+        {
+            cluster.schemaChange("create table " + KEYSPACE + ".tbl (id int primary key, t int)");
+            insert(cluster.coordinator(1), 0, 100);
+            cluster.forEach((node) -> node.flush(KEYSPACE));
+            cluster.get(1).callOnInstance(repair(options(false, false)));
+
+            insert(cluster.coordinator(1), 100, 100);
+            cluster.forEach((node) -> node.flush(KEYSPACE));
+
+            SimpleCondition previewRepairStarted = new SimpleCondition();
+            SimpleCondition continuePreviewRepair = new SimpleCondition();
+            // this pauses the validation request sent from node1 to node2 until the inc repair below has run
+            cluster.filters()
+                   .outbound()

Review comment:
       Note: If we don't use `outbound()` explicitly here, the single-threaded anti-entropy stage will be paused on the preview repair, then be unable to handle (on that single thread) the only thing that would allow it to progress, which is the incremental repair :)




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org