2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

Make all tasks to be bound to a thread

Previously, tasks could be created either unbound or bound to a specific
thread (worker loop).  The unbound tasks would be assigned to a random
thread every time isc_task_send() was called.  Because there's no logic
that would assign the task to the least busy worker, this just creates
unpredictability.  Instead of random assignment, bind all the previously
unbound tasks to worker 0, which is guaranteed to exist.
This commit is contained in:
Ondřej Surý
2022-05-19 11:20:21 +02:00
parent 9da46f3947
commit 1fe391fd40
28 changed files with 72 additions and 108 deletions

View File

@@ -732,7 +732,7 @@ dns_catz_new_zones(dns_catz_zones_t **catzsp, dns_catz_zonemodmethods_t *zmm,
new_zones->timermgr = timermgr;
new_zones->taskmgr = taskmgr;
result = isc_task_create(taskmgr, 0, &new_zones->updater);
result = isc_task_create(taskmgr, 0, &new_zones->updater, 0);
if (result != ISC_R_SUCCESS) {
goto cleanup_ht;
}