Skip to content

Commit

Permalink
Merge pull request #102 from aerospike/tools-2961
Browse files Browse the repository at this point in the history
fix: TOOLS-2961 Warning should be based transaction_worker_threads and not on n_threads
  • Loading branch information
a-spiker authored Sep 24, 2024
2 parents 3e49d3c + a1ffb5b commit 47eeb17
Showing 1 changed file with 5 additions and 4 deletions.
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 47eeb17

Please sign in to comment.