Skip to content

Commit ad4d72c

Browse files
Added message indicating sharding is disabled when running workload against a replicaset
1 parent 48b52d7 commit ad4d72c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

app.py

+3
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,9 @@ def log_workload_config(args, workload_length, workload_ratios, workload_logged)
355355
# Check if the function has already been executed
356356
if workload_logged:
357357
return
358+
# If running on a replicaset we know it can't be sharded, so we provide a clear message
359+
if "replicaSet" in dbconfig and dbconfig["replicaSet"]:
360+
args.shard = "Can't shard a replicaset, --shard option will be ignored and disabled automatically"
358361

359362
table_width = 115
360363
workload_details = textwrap.dedent(f"""\n

0 commit comments

Comments
 (0)