This is an automated email from the ASF dual-hosted git repository. ifesdjeen pushed a commit to branch cep-15-accord in repository https://gitbox.apache.org/repos/asf/cassandra.git
commit 49b4418fb48e4cd1bb0108c1bf2f4d577bbb3e70 Author: Alex Petrov <[email protected]> AuthorDate: Sat Oct 5 11:37:36 2024 +0200 Add bounce to load test --- .../cassandra/distributed/test/accord/AccordLoadTest.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/distributed/org/apache/cassandra/distributed/test/accord/AccordLoadTest.java b/test/distributed/org/apache/cassandra/distributed/test/accord/AccordLoadTest.java index 2dd741f5b2..dc2fed910a 100644 --- a/test/distributed/org/apache/cassandra/distributed/test/accord/AccordLoadTest.java +++ b/test/distributed/org/apache/cassandra/distributed/test/accord/AccordLoadTest.java @@ -46,6 +46,7 @@ import org.apache.cassandra.distributed.api.ConsistencyLevel; import org.apache.cassandra.distributed.api.ICoordinator; import org.apache.cassandra.distributed.api.IMessage; import org.apache.cassandra.distributed.api.IMessageFilters; +import org.apache.cassandra.distributed.shared.ClusterUtils; import org.apache.cassandra.distributed.shared.DistributedTestBase; import org.apache.cassandra.net.Verb; import org.apache.cassandra.service.accord.AccordService; @@ -95,6 +96,7 @@ public class AccordLoadTest extends AccordTestBase ICoordinator coordinator = cluster.coordinator(1); final int repairInterval = Integer.MAX_VALUE; + final int bounceInterval = 3000; // final int repairInterval = 3000; // final int compactionInterval = Integer.MAX_VALUE; final int compactionInterval = 3000; @@ -108,6 +110,7 @@ public class AccordLoadTest extends AccordTestBase final int ratePerSecond = 1000; final int keyCount = 1_000_000; final float readChance = 0.33f; + long nextBounce = bounceInterval; long nextRepairAt = repairInterval; long nextCompactionAt = compactionInterval; long nextFlushAt = flushInterval; @@ -177,6 +180,15 @@ public class AccordLoadTest extends AccordTestBase cluster.coordinator(1).instance().nodetool("repair", qualifiedAccordTableName); } + if ((nextBounce -= batchSize) <= 0) + { + nextBounce += bounceInterval; + System.out.println("bouncing..."); + cluster.get(2).nodetool("drain"); + ClusterUtils.stopUnchecked(cluster.get(2)); + cluster.get(2).startup(); + } + if ((nextCompactionAt -= batchSize) <= 0) { nextCompactionAt += compactionInterval; --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
