mirror of
https://github.com/isc-projects/bind9.git
synced 2026-03-01 04:50:50 -05:00
Set quantum to infinity for the zone loading task
When we are loading the zones, set the quantum to UINT_MAX, which makes task_run process all tasks at once. After the zone loading is finished the quantum will be dropped to 1 to not block server when we are loading new zones after reconfiguration.
This commit is contained in:
parent
15ea6f002f
commit
87c4c24cde
1 changed files with 4 additions and 1 deletions
|
|
@ -2426,6 +2426,9 @@ zone_asyncload(isc_task_t *task, isc_event_t *event) {
|
|||
(asl->loaded)(asl->loaded_arg, zone, task);
|
||||
}
|
||||
|
||||
/* Reduce the quantum */
|
||||
isc_task_setquantum(zone->loadtask, 1);
|
||||
|
||||
isc_mem_put(zone->mctx, asl, sizeof(*asl));
|
||||
dns_zone_idetach(&zone);
|
||||
}
|
||||
|
|
@ -19167,7 +19170,7 @@ dns_zonemgr_setsize(dns_zonemgr_t *zmgr, int num_zones) {
|
|||
pool = NULL;
|
||||
if (zmgr->loadtasks == NULL) {
|
||||
result = isc_taskpool_create(zmgr->taskmgr, zmgr->mctx, ntasks,
|
||||
2, true, &pool);
|
||||
UINT_MAX, true, &pool);
|
||||
} else {
|
||||
result = isc_taskpool_expand(&zmgr->loadtasks, ntasks, true,
|
||||
&pool);
|
||||
|
|
|
|||
Loading…
Reference in a new issue