mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-03 16:15:27 +00:00
1340. [bug] Delay and spread out the startup refresh load.
This commit is contained in:
2
CHANGES
2
CHANGES
@@ -1,3 +1,5 @@
|
|||||||
|
1340. [bug] Delay and spread out the startup refresh load.
|
||||||
|
|
||||||
1339. [func] dig, host and nslookup now use IP6.ARPA for nibble
|
1339. [func] dig, host and nslookup now use IP6.ARPA for nibble
|
||||||
lookups. Bit string lookups are no longer attempted.
|
lookups. Bit string lookups are no longer attempted.
|
||||||
|
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: zone.c,v 1.372 2002/07/19 02:34:56 marka Exp $ */
|
/* $Id: zone.c,v 1.373 2002/07/26 06:27:30 marka Exp $ */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
@@ -1338,6 +1338,7 @@ zone_postload(dns_zone_t *zone, dns_db_t *db, isc_time_t loadtime,
|
|||||||
if (zone->type == dns_zone_slave ||
|
if (zone->type == dns_zone_slave ||
|
||||||
zone->type == dns_zone_stub) {
|
zone->type == dns_zone_stub) {
|
||||||
isc_time_t t;
|
isc_time_t t;
|
||||||
|
isc_uint32_t delay;
|
||||||
|
|
||||||
result = isc_file_getmodtime(zone->journal, &t);
|
result = isc_file_getmodtime(zone->journal, &t);
|
||||||
if (result != ISC_R_SUCCESS)
|
if (result != ISC_R_SUCCESS)
|
||||||
@@ -1349,7 +1350,13 @@ zone_postload(dns_zone_t *zone, dns_db_t *db, isc_time_t loadtime,
|
|||||||
else
|
else
|
||||||
DNS_ZONE_TIME_ADD(&now, zone->retry,
|
DNS_ZONE_TIME_ADD(&now, zone->retry,
|
||||||
&zone->expiretime);
|
&zone->expiretime);
|
||||||
zone->refreshtime = now;
|
|
||||||
|
delay = isc_random_jitter(zone->retry,
|
||||||
|
(zone->retry * 3) / 4);
|
||||||
|
DNS_ZONE_TIME_ADD(&now, delay, &zone->refreshtime);
|
||||||
|
if (isc_time_compare(&zone->refreshtime,
|
||||||
|
&zone->expiretime) >= 0)
|
||||||
|
zone->refreshtime = now;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
Reference in New Issue
Block a user