Skip to content

Commit

Permalink
fix: TOOLS-2961 warning based on transaction_worker_threads
Browse files Browse the repository at this point in the history
  • Loading branch information
a-spiker committed Sep 23, 2024
1 parent 92fe208 commit a1ffb5b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/main/benchmark_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
9 changes: 5 additions & 4 deletions src/main/coordinator.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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");
}
Expand All @@ -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");
}
Expand Down

0 comments on commit a1ffb5b

Please sign in to comment.