This is an automated email from the ASF dual-hosted git repository.

samt pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra-dtest.git

commit c426e003e62ce8a94c36ed913f2e913a1d5462c9
Author: Sam Tunnicliffe <[email protected]>
AuthorDate: Tue Nov 7 17:38:43 2023 +0000

    [CEP-21] Add TCM-ised byteman script for 
read_repair_test.py::TestSpeculativeReadRepair
---
 byteman/read_repair/stop_rr_writes_5_1.btm |  8 ++++++++
 read_repair_test.py                        | 17 +++++++++++------
 2 files changed, 19 insertions(+), 6 deletions(-)

diff --git a/byteman/read_repair/stop_rr_writes_5_1.btm 
b/byteman/read_repair/stop_rr_writes_5_1.btm
new file mode 100644
index 00000000..04a16af5
--- /dev/null
+++ b/byteman/read_repair/stop_rr_writes_5_1.btm
@@ -0,0 +1,8 @@
+# block remote read repair mutation messages
+RULE disable read repair mutations
+CLASS org.apache.cassandra.db.AbstractMutationVerbHandler
+METHOD doVerb
+AT ENTRY
+IF true
+DO return;
+ENDRULE
diff --git a/read_repair_test.py b/read_repair_test.py
index fbdcaf35..8ec813d6 100644
--- a/read_repair_test.py
+++ b/read_repair_test.py
@@ -2,6 +2,8 @@ from contextlib import contextmanager
 import glob
 import os
 import time
+from distutils.version import LooseVersion
+
 import pytest
 import logging
 import subprocess
@@ -533,8 +535,9 @@ class TestSpeculativeReadRepair(Tester):
 
         node2.byteman_submit([mk_bman_path('read_repair/stop_writes.btm')])
         node3.byteman_submit([mk_bman_path('read_repair/stop_writes.btm')])
-        node2.byteman_submit([mk_bman_path('read_repair/stop_rr_writes.btm')])
-        node3.byteman_submit([mk_bman_path('read_repair/stop_rr_writes.btm')])
+        script_version = '_5_1' if self.cluster.version() >= 
LooseVersion('5.1') else ''
+        
node2.byteman_submit([mk_bman_path('read_repair/stop_rr_writes{}.btm'.format(script_version))])
+        
node3.byteman_submit([mk_bman_path('read_repair/stop_rr_writes{}.btm'.format(script_version))])
 
         with raises(WriteTimeout):
             session.execute(quorum("INSERT INTO ks.tbl (k, c, v) VALUES (1, 1, 
2)"))
@@ -656,7 +659,8 @@ class TestSpeculativeReadRepair(Tester):
         session.execute("INSERT INTO ks.tbl (k, c, v) VALUES (1, 1, 2)")
 
         # re-enable writes on node 3, leave them off on node2
-        node2.byteman_submit([mk_bman_path('read_repair/stop_rr_writes.btm')])
+        script_version = '_5_1' if self.cluster.version() >= 
LooseVersion('5.1') else ''
+        
node2.byteman_submit([mk_bman_path('read_repair/stop_rr_writes{}.btm'.format(script_version))])
 
         
node1.byteman_submit([mk_bman_path('read_repair/sorted_live_endpoints.btm')])
         with StorageProxy(node1) as storage_proxy:
@@ -698,9 +702,9 @@ class TestSpeculativeReadRepair(Tester):
         # force endpoint order
         
node1.byteman_submit([mk_bman_path('read_repair/sorted_live_endpoints.btm')])
 
-        # 
node2.byteman_submit([mk_bman_path('read_repair/stop_digest_reads.btm'])
         node2.byteman_submit([mk_bman_path('read_repair/stop_data_reads.btm')])
-        node3.byteman_submit([mk_bman_path('read_repair/stop_rr_writes.btm')])
+        script_version = '_5_1' if self.cluster.version() >= 
LooseVersion('5.1') else ''
+        
node3.byteman_submit([mk_bman_path('read_repair/stop_rr_writes{}.btm'.format(script_version))])
 
         with StorageProxy(node1) as storage_proxy:
             assert storage_proxy.get_table_metric("ks", "tbl", 
"SpeculativeRetries") == 0
@@ -745,7 +749,8 @@ class TestSpeculativeReadRepair(Tester):
 
         
node2.byteman_submit([mk_bman_path('read_repair/stop_digest_reads.btm')])
         node3.byteman_submit([mk_bman_path('read_repair/stop_data_reads.btm')])
-        node2.byteman_submit([mk_bman_path('read_repair/stop_rr_writes.btm')])
+        script_version = '_5_1' if self.cluster.version() >= 
LooseVersion('5.1') else ''
+        
node2.byteman_submit([mk_bman_path('read_repair/stop_rr_writes{}.btm'.format(script_version))])
 
         with StorageProxy(node1) as storage_proxy:
             assert storage_proxy.get_table_metric("ks", "tbl", 
"SpeculativeRetries") == 0


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to