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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user