Skip to content

Commit

Permalink
test(mixed-shard-repair): add test for mixed shard repair
Browse files Browse the repository at this point in the history
  • Loading branch information
Deexie committed Sep 19, 2024
1 parent 717ba95 commit a948bb9
Show file tree
Hide file tree
Showing 10 changed files with 142 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!groovy

// trick from https://github.com/jenkinsci/workflow-cps-global-lib-plugin/pull/43
def lib = library identifier: 'sct@snapshot', retriever: legacySCM(scm)

longevityPipeline(
backend: 'aws',
region: 'eu-west-1',
test_name: 'mixed_shard_repair_test.MixedShardRepair.test_mixed_shard_repair',
test_config: 'test-cases/features/fixed-shard-repair.yaml',
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!groovy

// trick from https://github.com/jenkinsci/workflow-cps-global-lib-plugin/pull/43
def lib = library identifier: 'sct@snapshot', retriever: legacySCM(scm)

longevityPipeline(
backend: 'aws',
region: 'eu-west-1',
test_name: 'mixed_shard_repair_test.MixedShardRepair.test_mixed_shard_repair',
test_config: 'test-cases/features/mixed-shard-repair.yaml',
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!groovy

// trick from https://github.com/jenkinsci/workflow-cps-global-lib-plugin/pull/43
def lib = library identifier: 'sct@snapshot', retriever: legacySCM(scm)

longevityPipeline(
backend: 'aws',
region: 'eu-west-1',
test_name: 'mixed_shard_repair_test.MixedShardRepair.test_mixed_shard_repair',
test_config: 'test-cases/features/mixed-shard-repair2.yaml',
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!groovy

// trick from https://github.com/jenkinsci/workflow-cps-global-lib-plugin/pull/43
def lib = library identifier: 'sct@snapshot', retriever: legacySCM(scm)

longevityPipeline(
backend: 'aws',
region: 'eu-west-1',
test_name: 'mixed_shard_repair_test.MixedShardRepair.test_mixed_shard_repair',
test_config: 'test-cases/features/mixed-shard-repair3.yaml',
)
19 changes: 19 additions & 0 deletions mixed_shard_repair_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from sdcm.tester import ClusterTester
from sdcm.utils.decorators import measure_time


class MixedShardRepair(ClusterTester):

def setUp(self):
super().setUp()
self.populate_data_parallel(size_in_gb=1024, blocking=True)

@measure_time
def _run_repair(self, node):
self.log.info('Running nodetool repair on {}'.format(node.name))
node.run_nodetool(sub_cmd='repair')

def test_mixed_shard_repair(self):
node = self.db_cluster.nodes[0]
repair_time = self._run_repair(node=node)[0] # pylint: disable=unsubscriptable-object
self.log.info('Repair time on node: {} is: {}'.format(node.name, repair_time))
2 changes: 1 addition & 1 deletion sdcm/cluster_aws.py
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,7 @@ def __init__(self, ec2_ami_id, ec2_subnet_id, ec2_security_group_ids, # pylint:
n_nodes=3,
params=None,
node_type: str = 'scylla-db',
nodes_smp = []
nodes_smp=[]
):
# pylint: disable=too-many-locals
# We have to pass the cluster name in advance in user_data
Expand Down
18 changes: 18 additions & 0 deletions test-cases/features/fixed-shard-repair.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
test_duration: 600

n_db_nodes: 3
n_loaders: 4
n_monitor_nodes: 1

nodes_smp: [60, 60, 60]

instance_type_db: 'i3.16xlarge'
instance_type_loader: 'c6i.2xlarge'

collect_logs: true
backtrace_decoding: true

hinted_handoff: 'disabled'

append_scylla_yaml:
enable_tablets: false
20 changes: 20 additions & 0 deletions test-cases/features/mixed-shard-repair.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
test_duration: 600

n_db_nodes: 3
n_loaders: 4
n_monitor_nodes: 1

nodes_smp: [60, 59, 58]

instance_type_db: 'i3.16xlarge'
instance_type_loader: 'c6i.2xlarge'

collect_logs: true
backtrace_decoding: true

hinted_handoff: 'disabled'

append_scylla_yaml:
enable_tablets: false

append_scylla_args: '--logger-log-level repair=debug'
20 changes: 20 additions & 0 deletions test-cases/features/mixed-shard-repair2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
test_duration: 600

n_db_nodes: 3
n_loaders: 4
n_monitor_nodes: 1

nodes_smp: [60, 48, 32]

instance_type_db: 'i3.16xlarge'
instance_type_loader: 'c6i.2xlarge'

collect_logs: true
backtrace_decoding: true

hinted_handoff: 'disabled'

append_scylla_yaml:
enable_tablets: false

append_scylla_args: '--logger-log-level repair=debug'
20 changes: 20 additions & 0 deletions test-cases/features/mixed-shard-repair3.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
test_duration: 600

n_db_nodes: 3
n_loaders: 4
n_monitor_nodes: 1

nodes_smp: [16, 16, 12]

instance_type_db: 'i3en.6xlarge'
instance_type_loader: 'c6i.2xlarge'

collect_logs: true
backtrace_decoding: true

hinted_handoff: 'disabled'

append_scylla_yaml:
enable_tablets: false

# append_scylla_args: '--logger-log-level repair=debug'

0 comments on commit a948bb9

Please sign in to comment.