This is an automated email from the ASF dual-hosted git repository.
brandonwilliams 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 f14da069 add spec retry perf test
f14da069 is described below
commit f14da069295aa66e6d1dd638a73ce136e759b1bf
Author: Brandon Williams <[email protected]>
AuthorDate: Tue Aug 13 16:00:08 2024 -0500
add spec retry perf test
Patch by brandonwilliams; reviewed by smiklosovic for CASSANDRA-18766
---
consistency_test.py | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/consistency_test.py b/consistency_test.py
index 5d50f746..5d68ffc6 100644
--- a/consistency_test.py
+++ b/consistency_test.py
@@ -10,6 +10,7 @@ from copy import deepcopy
from cassandra import ConsistencyLevel, consistency_value_to_name
from cassandra.query import BatchStatement, BatchType, SimpleStatement
+from tools.jmxutils import JolokiaAgent, make_mbean
from tools.assertions import (assert_all, assert_length_equal, assert_none,
assert_unavailable)
from dtest import MultiError, Tester, create_ks, create_cf
@@ -767,6 +768,25 @@ class TestAccuracy(TestHelper):
class TestConsistency(Tester):
+ @since('4.0')
+ def test_18766_sr(self):
+ """
+ @jira_ticket CASSANDRA-18766
+ """
+ cluster = self.cluster
+ self.cluster.populate(3).start()
+ node1 = cluster.nodelist()[0]
+ node1.stress(['write', 'n=100000', '-rate', 'threads=8', '-schema',
'replication(strategy=SimpleStrategy,replication_factor=2)'])
+ node1.stress(['read no-warmup duration=1m', '-rate', 'threads=8',
'-errors', 'skip-read-validation'])
+ speculative_reads_mbean = make_mbean("metrics", type="Table",
name="SpeculativeRetries", keyspace='keyspace1', scope='standard1')
+ coordinator_reads_mbean = make_mbean("metrics", type="Table",
name="CoordinatorReadLatency", keyspace='keyspace1', scope='standard1')
+ for node in cluster.nodelist():
+ with JolokiaAgent(node) as jmx:
+ sr = jmx.read_attribute(speculative_reads_mbean, "Count")
+ cr = jmx.read_attribute(coordinator_reads_mbean, "Count")
+ pcent = sr / cr * 100
+ assert pcent < 10, "Speculative retry percentage %.2f%% too
high on %s" % (pcent, node.address_and_port())
+
@since('3.0')
def test_14513_transient(self):
"""
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]