mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-03 08:05:21 +00:00
When lacking user-specified timer values from the SOA,
use a retry time that backs off exponentially from one minute up to six hours. This should allow the xferquota test to succeed [RT #337] by allowing for one or more retries during the test, while keeping the amount of SOA query traffic to dead masters reasonable for GNS.
This commit is contained in:
6
CHANGES
6
CHANGES
@@ -1,3 +1,9 @@
|
||||
|
||||
490. [func] When a slave/stub zone has not yet successfully
|
||||
obtained an SOA containing the zone's configured
|
||||
retry time, perform the SOA query retries using
|
||||
exponential backoff. [RT #337]
|
||||
|
||||
489. [func] The zone manager now has a "i/o" queue.
|
||||
|
||||
488. [bug] Locks weren't properly destroyed in some cases.
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: zone.h,v 1.76 2000/09/26 17:24:00 gson Exp $ */
|
||||
/* $Id: zone.h,v 1.77 2000/09/26 18:17:10 gson Exp $ */
|
||||
|
||||
#ifndef DNS_ZONE_H
|
||||
#define DNS_ZONE_H 1
|
||||
@@ -66,7 +66,8 @@ typedef enum {
|
||||
#define DNS_ZONE_MAXRETRY 1209600 /* 2 weeks */
|
||||
#endif
|
||||
#ifndef DNS_ZONE_DEFAULTRETRY
|
||||
#define DNS_ZONE_DEFAULTRETRY 1800 /* 30 minutes */
|
||||
#define DNS_ZONE_DEFAULTRETRY 60 /* 1 minute, subject to
|
||||
exponential backoff */
|
||||
#endif
|
||||
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: zone.c,v 1.221 2000/09/26 17:28:13 gson Exp $ */
|
||||
/* $Id: zone.c,v 1.222 2000/09/26 18:17:09 gson Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -205,6 +205,9 @@ struct dns_zone {
|
||||
* zone with no masters
|
||||
* occured */
|
||||
#define DNS_ZONEFLG_LOADING 0x00002000U /* load from disk in progress */
|
||||
#define DNS_ZONEFLG_HAVETIMERS 0x00004000U /* timer values have been set from
|
||||
SOA (if not set, we are still using
|
||||
default timer values) */
|
||||
|
||||
#define DNS_ZONE_OPTION(z,o) (((z)->options & (o)) != 0)
|
||||
|
||||
@@ -1056,8 +1059,9 @@ zone_postload(dns_zone_t *zone, dns_db_t *db, isc_time_t loadtime,
|
||||
zone->minretry, zone->maxretry);
|
||||
zone->expire = RANGE(expire, zone->refresh + zone->retry,
|
||||
DNS_MAX_EXPIRE);
|
||||
|
||||
zone->minimum = minimum;
|
||||
zone->flags |= DNS_ZONEFLG_HAVETIMERS;
|
||||
|
||||
if (zone->type == dns_zone_slave ||
|
||||
zone->type == dns_zone_stub) {
|
||||
isc_time_t t;
|
||||
@@ -1741,6 +1745,7 @@ zone_expire(dns_zone_t *zone) {
|
||||
zone->flags |= DNS_ZONEFLG_EXPIRED;
|
||||
zone->refresh = DNS_ZONE_DEFAULTREFRESH;
|
||||
zone->retry = DNS_ZONE_DEFAULTRETRY;
|
||||
zone->flags &= ~DNS_ZONEFLG_HAVETIMERS;
|
||||
zone_unload(zone);
|
||||
}
|
||||
|
||||
@@ -1787,6 +1792,14 @@ dns_zone_refresh(dns_zone_t *zone) {
|
||||
"refresh time (%u/%u), now %u",
|
||||
zone->refreshtime, zone->refresh, now);
|
||||
|
||||
/*
|
||||
* When lacking user-specified timer values from the SOA,
|
||||
* do exponential backoff of the retry time up to a
|
||||
* maximum of six hours.
|
||||
*/
|
||||
if (! DNS_ZONE_FLAG(zone, DNS_ZONEFLG_HAVETIMERS))
|
||||
zone->retry = ISC_MIN(zone->retry * 2, 6 * 3600);
|
||||
|
||||
zone->curmaster = 0;
|
||||
/* initiate soa query */
|
||||
queue_soa_query(zone);
|
||||
@@ -2716,6 +2729,9 @@ stub_callback(isc_task_t *task, isc_event_t *event) {
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* An SOA query has finished (successfully or not).
|
||||
*/
|
||||
static void
|
||||
refresh_callback(isc_task_t *task, isc_event_t *event) {
|
||||
const char me[] = "refresh_callback";
|
||||
@@ -4247,6 +4263,7 @@ zone_xfrdone(dns_zone_t *zone, isc_result_t result) {
|
||||
zone->refresh + zone->retry,
|
||||
DNS_MAX_EXPIRE);
|
||||
zone->minimum = minimum;
|
||||
zone->flags |= DNS_ZONEFLG_HAVETIMERS;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user