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 2024/06/11 16:16:29 UTC

(cassandra) branch trunk updated: Relax slow_query_log_timeout for MultiNodeSAITest

This is an automated email from the ASF dual-hosted git repository.

maedhroz pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git


The following commit(s) were added to refs/heads/trunk by this push:
     new ab1c3e4877 Relax slow_query_log_timeout for MultiNodeSAITest
ab1c3e4877 is described below

commit ab1c3e4877f215380dc6881cd7793ab4890ccfb4
Author: Caleb Rackliffe <ca...@gmail.com>
AuthorDate: Mon Jun 10 16:55:27 2024 -0500

    Relax slow_query_log_timeout for MultiNodeSAITest
    
    patch by Caleb Rackliffe; reviewed by Alex Petrov for CASSANDRA-19693
---
 CHANGES.txt                                        |  1 +
 .../cassandra/fuzz/sai/MultiNodeSAITest.java       |  5 +-
 .../cassandra/harry/sut/injvm/InJvmSutBase.java    | 57 ++++++++++++----------
 3 files changed, 35 insertions(+), 28 deletions(-)

diff --git a/CHANGES.txt b/CHANGES.txt
index 0db0b5d2a9..72b18f6237 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,6 @@
 <<<<<<< HEAD
 5.1
+ * Relax slow_query_log_timeout for MultiNodeSAITest (CASSANDRA-19693)
  * Audit Log entries are missing identity for mTLS connections (CASSANDRA-19669)
  * Add support for the BETWEEN operator in WHERE clauses (CASSANDRA-19604)
  * Replace Stream iteration with for-loop for SimpleRestriction::bindAndGetClusteringElements (CASSANDRA-19679)
diff --git a/test/distributed/org/apache/cassandra/fuzz/sai/MultiNodeSAITest.java b/test/distributed/org/apache/cassandra/fuzz/sai/MultiNodeSAITest.java
index b45b6f782b..a86472b99a 100644
--- a/test/distributed/org/apache/cassandra/fuzz/sai/MultiNodeSAITest.java
+++ b/test/distributed/org/apache/cassandra/fuzz/sai/MultiNodeSAITest.java
@@ -45,7 +45,10 @@ public class MultiNodeSAITest extends SingleNodeSAITest
         cluster = Cluster.build()
                          .withNodes(2)
                          // At lower fetch sizes, queries w/ hundreds or thousands of matches can take a very long time. 
-                         .withConfig(InJvmSutBase.defaultConfig().andThen(c -> c.set("range_request_timeout", "180s").set("read_request_timeout", "180s")
+                         .withConfig(InJvmSutBase.defaultConfig().andThen(c -> c.set("range_request_timeout", "180s")
+                                                                                .set("read_request_timeout", "180s")
+                                                                                .set("native_transport_timeout", "180s")
+                                                                                .set("slow_query_log_timeout", "180s")
                                                                                 .with(GOSSIP).with(NETWORK)))
                          .createWithoutStarting();
         cluster.setUncaughtExceptionsFilter(t -> {
diff --git a/test/harry/main/org/apache/cassandra/harry/sut/injvm/InJvmSutBase.java b/test/harry/main/org/apache/cassandra/harry/sut/injvm/InJvmSutBase.java
index 3d142e6c7d..db119acc02 100644
--- a/test/harry/main/org/apache/cassandra/harry/sut/injvm/InJvmSutBase.java
+++ b/test/harry/main/org/apache/cassandra/harry/sut/injvm/InJvmSutBase.java
@@ -144,38 +144,41 @@ public class InJvmSutBase<NODE extends IInstance, CLUSTER extends ICluster<NODE>
         if (isShutdown.get())
             throw new RuntimeException("Instance is shut down");
 
-        try
+        while (true)
         {
-            if (cl == ConsistencyLevel.NODE_LOCAL)
-            {
-                return cluster.get(coordinator)
-                              .executeInternal(statement, bindings);
-            }
-            else if (StringUtils.startsWithIgnoreCase(statement, "SELECT"))
+            try
             {
-                return Iterators.toArray(cluster
-                                         // round-robin
-                                         .coordinator(coordinator)
-                                         .executeWithPaging(statement, toApiCl(cl), pageSize, bindings),
-                                         Object[].class);
+                if (cl == ConsistencyLevel.NODE_LOCAL)
+                {
+                    return cluster.get(coordinator)
+                                  .executeInternal(statement, bindings);
+                }
+                else if (StringUtils.startsWithIgnoreCase(statement, "SELECT"))
+                {
+                    return Iterators.toArray(cluster
+                                             // round-robin
+                                             .coordinator(coordinator)
+                                             .executeWithPaging(statement, toApiCl(cl), pageSize, bindings),
+                                             Object[].class);
+                }
+                else
+                {
+                    return cluster
+                           // round-robin
+                           .coordinator(coordinator)
+                           .execute(statement, toApiCl(cl), bindings);
+                }
             }
-            else
+            catch (Throwable t)
             {
-                return cluster
-                       // round-robin
-                       .coordinator(coordinator)
-                       .execute(statement, toApiCl(cl), bindings);
-            }
-        }
-        catch (Throwable t)
-        {
-            if (retryStrategy.apply(t))
-                return execute(statement, cl, bindings);
+                if (retryStrategy.apply(t))
+                    continue;
 
-            logger.error(String.format("Caught error while trying execute statement %s (%s): %s",
-                                       statement, Arrays.toString(bindings), t.getMessage()),
-                         t);
-            throw t;
+                logger.error(String.format("Caught error while trying execute statement %s (%s): %s",
+                                           statement, Arrays.toString(bindings), t.getMessage()),
+                             t);
+                throw t;
+            }
         }
     }
 


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