diff --git a/test/nodetool/test_repair.py b/test/nodetool/test_repair.py index 604340fdf0..6c97b982ad 100644 --- a/test/nodetool/test_repair.py +++ b/test/nodetool/test_repair.py @@ -478,6 +478,11 @@ def test_repair_unused_options(request, nodetool, jobs, full): if full: args.append(full) + if jobs: + job_threads = jobs[1] + else: + job_threads = "1" + res = nodetool(*args, expected_requests=[ expected_request("GET", "/storage_service/keyspaces", response=["ks"]), JMX_COLUMN_FAMILIES_REQUEST, @@ -492,7 +497,7 @@ def test_repair_unused_options(request, nodetool, jobs, full): "incremental": "false", "pullRepair": "false", "primaryRange": "false", - "jobThreads": "1"}, + "jobThreads": job_threads}, response=1), expected_request("GET", "/storage_service/repair_async/ks", params={"id": "1"}, response="SUCCESSFUL")]) diff --git a/tools/scylla-nodetool.cc b/tools/scylla-nodetool.cc index 50b0c05b13..c486dfa76d 100644 --- a/tools/scylla-nodetool.cc +++ b/tools/scylla-nodetool.cc @@ -1326,6 +1326,10 @@ void repair_operation(scylla_rest_client& client, const bpo::variables_map& vm) repair_params["primaryRange"] = "true"; } + if (vm.contains("job-threads")) { + repair_params["jobThreads"] = fmt::to_string(vm["job-threads"].as()); + } + auto log = [&] (fmt::format_string fmt, Args&&... param) { const auto msg = fmt::format(fmt, param...); using clock = std::chrono::system_clock; @@ -3075,7 +3079,7 @@ Fore more information, see: https://opensource.docs.scylladb.com/stable/operatin typed_option<>("in-local-dc", "Constrain repair to the local datacenter only"), typed_option>("in-hosts", "Constrain repair to the specific host(s)"), typed_option<>("ignore-unreplicated-keyspaces", "Ignore keyspaces which are not replicated, without this repair will fail on such keyspaces"), - typed_option("job-threads,j", "Number of threads to run repair on. "), + typed_option("job-threads,j", "Number of threads to run repair on"), typed_option<>("partitioner-range", "Repair only the first range returned by the partitioner"), typed_option<>("pull", "Fix local node only"), typed_option<>("sequential", "Perform repair sequentially"),