From 92fe2089dc1f827a0c15da08453c0a6150656b6c Mon Sep 17 00:00:00 2001 From: Akash Chandra Date: Fri, 20 Sep 2024 10:45:35 +0530 Subject: [PATCH 1/2] fix: TOOLS-2961 Set keys size for 17 Transaction Threads --- src/main/benchmark_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/benchmark_init.c b/src/main/benchmark_init.c index 629f1729..39534453 100644 --- a/src/main/benchmark_init.c +++ b/src/main/benchmark_init.c @@ -1861,7 +1861,7 @@ _load_defaults(args_t* args) args->set = "testset"; args->bin_name = strdup("testbin"); args->start_key = 1; - args->keys = 1000000; + args->keys = 1000008; memset(&args->stage_defs, 0, sizeof(struct stage_defs_s)); args->workload_stages_file = NULL; obj_spec_parse(&args->obj_spec, "I"); From a1ffb5bda8733ba75d09abb1403e7a8a6a2bab2e Mon Sep 17 00:00:00 2001 From: Akash Chandra Date: Mon, 23 Sep 2024 13:07:07 +0530 Subject: [PATCH 2/2] fix: TOOLS-2961 warning based on transaction_worker_threads --- src/main/benchmark_init.c | 2 +- src/main/coordinator.c | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/benchmark_init.c b/src/main/benchmark_init.c index 39534453..629f1729 100644 --- a/src/main/benchmark_init.c +++ b/src/main/benchmark_init.c @@ -1861,7 +1861,7 @@ _load_defaults(args_t* args) args->set = "testset"; args->bin_name = strdup("testbin"); args->start_key = 1; - args->keys = 1000008; + args->keys = 1000000; memset(&args->stage_defs, 0, sizeof(struct stage_defs_s)); args->workload_stages_file = NULL; obj_spec_parse(&args->obj_spec, "I"); diff --git a/src/main/coordinator.c b/src/main/coordinator.c index c5450b95..b2435de6 100644 --- a/src/main/coordinator.c +++ b/src/main/coordinator.c @@ -124,6 +124,7 @@ coordinator_worker(void* udata) cdata_t* cdata = args->cdata; tdata_t** tdatas = args->tdatas; uint32_t n_threads = args->n_threads; + uint32_t worker_threads = args->cdata->transaction_worker_threads; as_random random; uint32_t n_stages = cdata->stages.n_stages; @@ -145,12 +146,12 @@ coordinator_worker(void* udata) } } else { // TODO when async is multithreaded change this - if (stage->batch_write_size * n_threads > nkeys) { + if (stage->batch_write_size * worker_threads > nkeys) { blog_warn("--batch-write-size * --threads is greater than --keys so " "more than --keys records will be written\n"); } - if (nkeys % (stage->batch_write_size * n_threads) != 0) { + if (nkeys % (stage->batch_write_size * worker_threads) != 0) { blog_warn("--keys is not divisible by (--batch-write-size * --threads) so more than " "--keys records will be written\n"); } @@ -167,12 +168,12 @@ coordinator_worker(void* udata) } } else { // TODO when async is multithreaded change this - if (stage->batch_delete_size * n_threads > nkeys) { + if (stage->batch_delete_size * worker_threads > nkeys) { blog_warn("--batch-delete-size * --threads is greater than --keys so more than " "--keys records will be deleted\n"); } - if (nkeys % (stage->batch_delete_size * n_threads) != 0) { + if (nkeys % (stage->batch_delete_size * worker_threads) != 0) { blog_warn("--keys is not divisible by (--batch-delete-size * --threads) so more than " "--keys records will be deleted\n"); }