This is an automated email from the ASF dual-hosted git repository.
asf-gitbox-commits pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra-dtest.git
The following commit(s) were added to refs/heads/trunk by this push:
new 6d1c66cb Fix failures after cassandra_latest.yaml changed to Paxos v2
6d1c66cb is described below
commit 6d1c66cb80d103cdfbb391559b4bf38a962537e7
Author: Mick Semb Wever <[email protected]>
AuthorDate: Sat May 30 23:35:18 2026 +0200
Fix failures after cassandra_latest.yaml changed to Paxos v2
- don't assert on contention metrics when using v2
- skip paxos repair when nodes are bootstrapped or replaced (and a replica
is unavailable)
patch by Mick Semb Wever; reviewed by Dmitry Konstantinov for
CASSANDRA-21327
---
bootstrap_test.py | 10 ++++++++--
client_request_metrics_test.py | 8 +++++++-
replace_address_test.py | 13 +++++++++----
3 files changed, 24 insertions(+), 7 deletions(-)
diff --git a/bootstrap_test.py b/bootstrap_test.py
index 9613eb55..6469825e 100644
--- a/bootstrap_test.py
+++ b/bootstrap_test.py
@@ -396,8 +396,11 @@ class BootstrapTester(Tester):
node2.set_configuration_options(values={'initial_token':
tokens[2]})
node3_token = tokens[1] # Add node 3 between node1 and node2
- cluster.start()
+ # Skip paxos repair during topology changes when testing with replicas
down,
+ # as paxos repair requires reaching other nodes. This is necessary
with Paxos v2 enabled.
+ jvm_args = ["-Dcassandra.skip_paxos_repair_on_topology_change=true"]
+ cluster.start(jvm_args=jvm_args)
node1.stress(['write', 'n=10K', 'no-warmup', '-rate', 'threads=8',
'-schema', 'replication(factor={})'.format(rf)])
# change system_auth keyspace to 2 (default is 1) to avoid
@@ -416,9 +419,12 @@ class BootstrapTester(Tester):
node3 = new_node(cluster, token=node3_token)
- jvmargs =
["-Dcassandra.consistent.rangemovement={}".format(consistent_range_movement)]
+ jvmargs =
["-Dcassandra.consistent.rangemovement={}".format(consistent_range_movement),
+ "-Dcassandra.skip_paxos_repair_on_topology_change=true"]
+
if cluster.version() >= LooseVersion('5.1'):
node3.set_configuration_options(values={'progress_barrier_min_consistency_level':
'NODE_LOCAL', 'progress_barrier_default_consistency_level': 'NODE_LOCAL',
'progress_barrier_timeout': '2000ms'})
+
node3.start(wait_for_binary_proto=successful_bootstrap_expected,
wait_other_notice=successful_bootstrap_expected,
jvm_args=jvmargs)
diff --git a/client_request_metrics_test.py b/client_request_metrics_test.py
index 4d1261c6..33aee912 100644
--- a/client_request_metrics_test.py
+++ b/client_request_metrics_test.py
@@ -379,7 +379,13 @@ class TestClientRequestMetrics(Tester):
assert diff['Latency.Count'] == query_count
assert diff['TotalLatency.Count'] > 0
- assert 0 < diff['ContentionHistogram.Count'] <= query_count
+
+ # Only check contention for Paxos v1
+ node = self.cluster.nodelist()[0]
+ paxos_variant = node.get_conf_option('paxos_variant')
+ # XXX if Config.paxos_variant changes from v1 so must this assumption
about None
+ if paxos_variant is None or paxos_variant.startswith('v1'):
+ assert 0 < diff['ContentionHistogram.Count'] <= query_count
def cas_read_failures(self):
self.read_failures_variant('CASRead', f"WHERE k={TOMBSTONE_FAIL_KEY}",
diff --git a/replace_address_test.py b/replace_address_test.py
index 23d50f9b..d63112d2 100644
--- a/replace_address_test.py
+++ b/replace_address_test.py
@@ -46,7 +46,7 @@ class BaseReplaceAddressTest(Tester):
r'peer 127.0.0.1:7000 is probably down'
)
- def _setup(self, n=3, opts=None, enable_byteman=False,
mixed_versions=False):
+ def _setup(self, n=3, opts=None, enable_byteman=False,
mixed_versions=False, jvm_args=None):
logger.debug("Starting cluster with {} nodes.".format(n))
self.cluster.populate(n)
if opts is not None:
@@ -69,7 +69,9 @@ class BaseReplaceAddressTest(Tester):
self.cluster.set_install_dir(version="2.2.4")
self.install_nodetool_legacy_parsing()
- jvm_args = []
+ if jvm_args is None:
+ jvm_args = []
+
if self.cluster.cassandra_version() >= '4.0':
jvm_args.append("-Dcassandra.failed_bootstrap_timeout_ms=30000")
@@ -614,7 +616,8 @@ class TestReplaceAddress(BaseReplaceAddressTest):
self.fixture_dtest_setup.ignore_log_patterns =
list(self.fixture_dtest_setup.ignore_log_patterns) + [
r'Unable to find sufficient sources for streaming range']
- self._setup(n=3)
+ # Skip paxos repair during topology changes when testing with replicas
down (necessary w/ Paxos v2)
+ self._setup(n=3,
jvm_args=["-Dcassandra.skip_paxos_repair_on_topology_change=true"])
self._insert_data(rf=2)
self._stop_node_to_replace()
@@ -631,9 +634,11 @@ class TestReplaceAddress(BaseReplaceAddressTest):
options = {'progress_barrier_min_consistency_level': 'ONE',
'progress_barrier_default_consistency_level': 'ONE'}
+ # Skip paxos repair during topology changes when testing with replicas
down (necessary w/ Paxos v2)
self._do_replace(wait_for_binary_proto=False,
wait_other_notice=False,
- opts=options)
+ opts=options,
+
extra_jvm_args=["-Dcassandra.skip_paxos_repair_on_topology_change=true"])
# replace should fail due to insufficient replicas
self.replacement_node.watch_log_for("Unable to find sufficient sources
for streaming range")
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]