From 6740834f3a4929ac5d3b94d93b0e306020047c26 Mon Sep 17 00:00:00 2001 From: Blake Eggleston Date: Tue, 24 Mar 2026 15:13:30 -0700 Subject: [PATCH] ninja - disable per partition limits for mutation tracking and witness ast tests --- ...NodeTableWalkWithMutationTrackingTest.java | 25 ++++++++++++++++++- .../MultiNodeTableWalkWithWitnessesTest.java | 2 +- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/test/distributed/org/apache/cassandra/distributed/test/cql3/MultiNodeTableWalkWithMutationTrackingTest.java b/test/distributed/org/apache/cassandra/distributed/test/cql3/MultiNodeTableWalkWithMutationTrackingTest.java index 3dfe75e24a..edb8b1c6d7 100644 --- a/test/distributed/org/apache/cassandra/distributed/test/cql3/MultiNodeTableWalkWithMutationTrackingTest.java +++ b/test/distributed/org/apache/cassandra/distributed/test/cql3/MultiNodeTableWalkWithMutationTrackingTest.java @@ -27,7 +27,9 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import accord.utils.Property; +import accord.utils.RandomSource; import org.apache.cassandra.cql3.ast.CreateIndexDDL; +import org.apache.cassandra.cql3.ast.Select; import org.apache.cassandra.distributed.Cluster; import org.apache.cassandra.distributed.api.IInstanceConfig; import org.apache.cassandra.schema.ReplicationType; @@ -41,17 +43,38 @@ import static org.apache.cassandra.cql3.KnownIssue.AF_MULTI_NODE_MULTI_COLUMN_AN public class MultiNodeTableWalkWithMutationTrackingTest extends MultiNodeTableWalkBase { private static final Logger logger = LoggerFactory.getLogger(MultiNodeTableWalkWithMutationTrackingTest.class); - + public MultiNodeTableWalkWithMutationTrackingTest() { super(ReadRepairStrategy.NONE, ReplicationType.tracked); } + protected class MutationTrackingState extends MultiNodeState + { + public MutationTrackingState(RandomSource rs, Cluster cluster) + { + super(rs, cluster); + } + + @Override + protected boolean allowPerPartitionLimit(Select select) + { + return false; + } + } + + @Override + protected State createState(RandomSource rs, Cluster cluster) + { + return new MutationTrackingState(rs, cluster); + } + @Override protected void preCheck(Cluster cluster, Property.StatefulBuilder builder) { // if a failing seed is detected, populate here // Example: builder.withSeed(42L); + // builder.withExamples(10); // CQL operations may have opertors such as +, -, and / (example 4 + 4), to "apply" them to get a constant value // CQL_DEBUG_APPLY_OPERATOR = true; // When mutations look to be lost as seen by more complex SELECTs, it can be useful to just SELECT the partition/row right after to write to see if it was safe at the time. diff --git a/test/distributed/org/apache/cassandra/distributed/test/cql3/MultiNodeTableWalkWithWitnessesTest.java b/test/distributed/org/apache/cassandra/distributed/test/cql3/MultiNodeTableWalkWithWitnessesTest.java index 84d0ea5d84..4401c06e09 100644 --- a/test/distributed/org/apache/cassandra/distributed/test/cql3/MultiNodeTableWalkWithWitnessesTest.java +++ b/test/distributed/org/apache/cassandra/distributed/test/cql3/MultiNodeTableWalkWithWitnessesTest.java @@ -44,7 +44,7 @@ public class MultiNodeTableWalkWithWitnessesTest extends MultiNodeTableWalkWithM return List.of(); } - protected class MultiNodeState extends State + protected class MultiNodeState extends MutationTrackingState { public MultiNodeState(RandomSource rs, Cluster cluster) {