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 2022/03/31 11:24:21 UTC

[GitHub] [cassandra] sathyakplm commented on a change in pull request #1509: CASSANDRA-17217 Add proper histogram checkup to fix flaky failThresholdSinglePartition

sathyakplm commented on a change in pull request #1509:
URL: https://github.com/apache/cassandra/pull/1509#discussion_r839495191



##########
File path: test/distributed/org/apache/cassandra/distributed/test/trackwarnings/AbstractClientSizeWarning.java
##########
@@ -283,15 +295,26 @@ public boolean matches(InetAddress value)
         }
         assertHistogramUpdated();
         assertWarnAborts(0, 2, 1);
+    }
+
+    public void failThresholdDisabled(String cql) throws UnknownHostException
+    {
+        ICoordinator node = CLUSTER.coordinator(1);
+        for (int i = 0; i < failThresholdRowCount(); i++)
+            node.execute("INSERT INTO " + KEYSPACE + ".tbl (pk, ck, v) VALUES (1, ?, ?)", ConsistencyLevel.ALL, i + 1, bytes(512));
+
+        if (shouldFlush())
+            CLUSTER.stream().forEach(i -> i.flush(KEYSPACE));
 
         // query should no longer fail
         enable(false);
+        checkpointHistogram();
         SimpleQueryResult result = node.executeWithResult(cql, ConsistencyLevel.ALL);
         assertThat(result.warnings()).isEmpty();
         assertHistogramNotUpdated();

Review comment:
       One minor query. In Line 313, we are asserting that the warnings is empty. Isn't that sufficient? Do we still need to check if the histogram hasn't updated? Isn't it redundant?




-- 
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.

To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org

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