Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: TOOLS-2961 Warning should be based transaction_worker_threads and not on n_threads #102

Merged
merged 2 commits into from
Sep 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading