You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by ad...@apache.org on 2022/07/05 11:32:33 UTC
[cassandra] 01/01: Merge branch 'cassandra-4.1' into trunk
This is an automated email from the ASF dual-hosted git repository.
adelapena pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git
commit 5616675b1fa7d5b979c0d345ea5f3a3182f6c2d7
Merge: 33a9093c5c 91d08e496e
Author: Andrés de la Peña <a....@gmail.com>
AuthorDate: Tue Jul 5 12:19:42 2022 +0100
Merge branch 'cassandra-4.1' into trunk
.../upgrade/MixedModeAvailabilityTestBase.java | 182 +++++++++++----------
...ava => MixedModeAvailabilityV30AllOneTest.java} | 10 +-
...ava => MixedModeAvailabilityV30OneAllTest.java} | 10 +-
... MixedModeAvailabilityV30QuorumQuorumTest.java} | 10 +-
...ava => MixedModeAvailabilityV3XAllOneTest.java} | 10 +-
...ava => MixedModeAvailabilityV3XOneAllTest.java} | 10 +-
... MixedModeAvailabilityV3XQuorumQuorumTest.java} | 10 +-
7 files changed, 132 insertions(+), 110 deletions(-)
diff --cc test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeAvailabilityTestBase.java
index 3c15032e19,4e50eb1481..1ca23ae80e
--- a/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeAvailabilityTestBase.java
+++ b/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeAvailabilityTestBase.java
@@@ -67,29 -71,37 +71,46 @@@ public abstract class MixedModeAvailabi
@Test
public void testAvailabilityCoordinatorUpgraded() throws Throwable
{
- testAvailability(true, initial);
+ testAvailability(true, initial, writeConsistencyLevel, readConsistencyLevel);
+ }
+
++ protected static void testAvailability(Semver initial,
++ ConsistencyLevel writeConsistencyLevel,
++ ConsistencyLevel readConsistencyLevel) throws Throwable
++ {
++ testAvailability(true, initial, writeConsistencyLevel, readConsistencyLevel);
++ testAvailability(false, initial, writeConsistencyLevel, readConsistencyLevel);
+ }
+
private static void testAvailability(boolean upgradedCoordinator,
- Semver initial) throws Throwable
+ Semver initial,
+ ConsistencyLevel writeConsistencyLevel,
+ ConsistencyLevel readConsistencyLevel) throws Throwable
{
new TestCase()
.nodes(NUM_NODES)
.nodesToUpgrade(upgradedCoordinator ? 1 : 2)
- .upgrades(initial, UpgradeTestBase.CURRENT)
+ .upgradesToCurrentFrom(initial)
- .withConfig(config -> config.set("read_request_timeout_in_ms", SECONDS.toMillis(2))
- .set("write_request_timeout_in_ms", SECONDS.toMillis(2)))
+ .withConfig(config -> config.set("read_request_timeout_in_ms", SECONDS.toMillis(5))
+ .set("write_request_timeout_in_ms", SECONDS.toMillis(5)))
// use retry of 10ms so that each check is consistent
// At the start of the world cfs.sampleLatencyNanos == 0, which means speculation acts as if ALWAYS is done,
// but after the first refresh this gets set high enough that we don't trigger speculation for the rest of the test!
// To be consistent set retry to 10ms so cfs.sampleLatencyNanos stays consistent for the duration of the test.
- .setup(c -> c.schemaChange(withKeyspace("CREATE TABLE %s.t (k uuid, c int, v int, PRIMARY KEY (k, c)) WITH speculative_retry = '10ms'")))
+ .setup(cluster -> {
+ cluster.schemaChange(withKeyspace("CREATE TABLE %s.t (k uuid, c int, v int, PRIMARY KEY (k, c)) WITH speculative_retry = '10ms'"));
+ cluster.setUncaughtExceptionsFilter(throwable -> throwable instanceof RejectedExecutionException);
+ })
+ .runBeforeClusterUpgrade(cluster -> cluster.filters().reset())
.runAfterNodeUpgrade((cluster, n) -> {
+ ICoordinator coordinator = cluster.coordinator(COORDINATOR);
+
// using 0 to 2 down nodes...
- for (int numNodesDown = 0; numNodesDown < NUM_NODES; numNodesDown++)
+ for (int i = 0; i < NUM_NODES; i++)
{
+ final int numNodesDown = i;
+
// disable communications to the down nodes
if (numNodesDown > 0)
{
diff --cc test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeAvailabilityV3XOneAllTest.java
index d656958fcd,8ea94ea749..59554d15c9
--- a/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeAvailabilityV3XOneAllTest.java
+++ b/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeAvailabilityV3XOneAllTest.java
@@@ -18,13 -18,15 +18,15 @@@
package org.apache.cassandra.distributed.upgrade;
+ import org.apache.cassandra.distributed.api.ConsistencyLevel;
+
/**
- * {@link MixedModeAvailabilityTestBase} for upgrades from v30.
+ * {@link MixedModeAvailabilityTestBase} for upgrades from v3X with ONE-ALL write-read consistency.
*/
- public class MixedModeAvailabilityV30Test extends MixedModeAvailabilityTestBase
+ public class MixedModeAvailabilityV3XOneAllTest extends MixedModeAvailabilityTestBase
{
- public MixedModeAvailabilityV30Test()
- public MixedModeAvailabilityV3XOneAllTest() throws Throwable
++ public MixedModeAvailabilityV3XOneAllTest()
{
- super(v30);
+ super(v3X, ConsistencyLevel.ONE, ConsistencyLevel.ALL);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org