@@ -1005,10 +1005,9 @@ def disrupt_restart_with_resharding(self):
1005
1005
"Run 'disrupt_nodetool_flush_and_reshard_on_kubernetes' instead" )
1006
1006
1007
1007
# If tablets in use, skipping resharding since it is not supported.
1008
- with self .cluster .cql_connection_patient (self .target_node ) as session :
1009
- if is_tablets_feature_enabled (session = session ):
1010
- if SkipPerIssues ('https://github.com/scylladb/scylladb/issues/16739' , params = self .tester .params ):
1011
- raise UnsupportedNemesis ('https://github.com/scylladb/scylladb/issues/16739' )
1008
+ if is_tablets_feature_enabled (self .target_node ):
1009
+ if SkipPerIssues ('https://github.com/scylladb/scylladb/issues/16739' , params = self .tester .params ):
1010
+ raise UnsupportedNemesis ('https://github.com/scylladb/scylladb/issues/16739' )
1012
1011
1013
1012
murmur3_partitioner_ignore_msb_bits = 15 # pylint: disable=invalid-name
1014
1013
self .log .info (f'Restart node with resharding. New murmur3_partitioner_ignore_msb_bits value: '
@@ -1424,10 +1423,9 @@ def disrupt_nodetool_flush_and_reshard_on_kubernetes(self):
1424
1423
if not self ._is_it_on_kubernetes ():
1425
1424
raise UnsupportedNemesis ('It is supported only on kubernetes' )
1426
1425
# If tablets in use, skipping resharding since it is not supported.
1427
- with self .cluster .cql_connection_patient (self .target_node ) as session :
1428
- if is_tablets_feature_enabled (session = session ):
1429
- if SkipPerIssues ('https://github.com/scylladb/scylladb/issues/16739' , params = self .tester .params ):
1430
- raise UnsupportedNemesis ('https://github.com/scylladb/scylladb/issues/16739' )
1426
+ if is_tablets_feature_enabled (self .target_node ):
1427
+ if SkipPerIssues ('https://github.com/scylladb/scylladb/issues/16739' , params = self .tester .params ):
1428
+ raise UnsupportedNemesis ('https://github.com/scylladb/scylladb/issues/16739' )
1431
1429
1432
1430
dc_idx = 0
1433
1431
for node in self .cluster .nodes :
@@ -1710,10 +1708,9 @@ def disrupt_nodetool_refresh(self, big_sstable: bool = False):
1710
1708
# NOTE: resharding happens only if we have more than 1 core.
1711
1709
# We may have 1 core in a K8S multitenant setup.
1712
1710
# If tablets in use, skipping resharding validation since it doesn't work the same as vnodes
1713
- with self .cluster .cql_connection_patient (self .cluster .nodes [0 ]) as session :
1714
- if shards_num > 1 and not is_tablets_feature_enabled (session = session ):
1715
- SstableLoadUtils .validate_resharding_after_refresh (
1716
- node = node , system_log_follower = system_log_follower )
1711
+ if shards_num > 1 and not is_tablets_feature_enabled (self .cluster .nodes [0 ]):
1712
+ SstableLoadUtils .validate_resharding_after_refresh (
1713
+ node = node , system_log_follower = system_log_follower )
1717
1714
1718
1715
# Verify that the special key is loaded by SELECT query
1719
1716
result = self .target_node .run_cqlsh (query_verify )
@@ -5103,10 +5100,9 @@ def _wait_for_tablets_balanced(self, node):
5103
5100
if not node .raft .is_enabled :
5104
5101
self .log .info ("Raft is disabled, skipping wait for balance" )
5105
5102
return
5106
- with self .cluster .cql_connection_patient (node = node ) as session :
5107
- if not is_tablets_feature_enabled (session ):
5108
- self .log .info ("Tablets are disabled, skipping wait for balance" )
5109
- return
5103
+ if not is_tablets_feature_enabled (node ):
5104
+ self .log .info ("Tablets are disabled, skipping wait for balance" )
5105
+ return
5110
5106
time .sleep (60 ) # one minute gap before checking, just to give some time to the state machine
5111
5107
client = RemoteCurlClient (host = "127.0.0.1:10000" , endpoint = "" , node = node )
5112
5108
self .log .info ("Waiting for tablets to be balanced" )
0 commit comments