1204. [bug] The RTT estimate on unused servers was not aged.
[RT #2569]
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
1204. [bug] The RTT estimate on unused servers was not aged.
|
||||
[RT #2569]
|
||||
|
||||
1203. [func] Use "dataready" accept filter if available.
|
||||
|
||||
1302. [port] libbind: hpux 11.11 interface scaning.
|
||||
|
||||
+6
-3
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: adb.c,v 1.195 2001/11/30 01:59:03 gson Exp $ */
|
||||
/* $Id: adb.c,v 1.196 2002/05/27 06:30:22 marka Exp $ */
|
||||
|
||||
/*
|
||||
* Implementation notes
|
||||
@@ -3935,8 +3935,11 @@ dns_adb_adjustsrtt(dns_adb_t *adb, dns_adbaddrinfo_t *addr,
|
||||
bucket = addr->entry->lock_bucket;
|
||||
LOCK(&adb->entrylocks[bucket]);
|
||||
|
||||
new_srtt = (addr->entry->srtt / 10 * factor)
|
||||
+ (rtt / 10 * (10 - factor));
|
||||
if (factor == DNS_ADB_RTTADJAGE)
|
||||
new_srtt = addr->entry->srtt * 98 / 100;
|
||||
else
|
||||
new_srtt = (addr->entry->srtt / 10 * factor)
|
||||
+ (rtt / 10 * (10 - factor));
|
||||
|
||||
addr->entry->srtt = new_srtt;
|
||||
addr->srtt = new_srtt;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: adb.h,v 1.70 2002/02/20 03:34:26 marka Exp $ */
|
||||
/* $Id: adb.h,v 1.71 2002/05/27 06:30:25 marka Exp $ */
|
||||
|
||||
#ifndef DNS_ADB_H
|
||||
#define DNS_ADB_H 1
|
||||
@@ -483,6 +483,7 @@ dns_adb_marklame(dns_adb_t *adb, dns_adbaddrinfo_t *addr, dns_name_t *zone,
|
||||
*/
|
||||
#define DNS_ADB_RTTADJDEFAULT 7 /* default scale */
|
||||
#define DNS_ADB_RTTADJREPLACE 0 /* replace with our rtt */
|
||||
#define DNS_ADB_RTTADJAGE 10 /* age this rtt */
|
||||
|
||||
void
|
||||
dns_adb_adjustsrtt(dns_adb_t *adb, dns_adbaddrinfo_t *addr,
|
||||
|
||||
+20
-1
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: resolver.c,v 1.241 2002/04/03 02:44:57 marka Exp $ */
|
||||
/* $Id: resolver.c,v 1.242 2002/05/27 06:30:24 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -410,6 +410,25 @@ fctx_cancelquery(resquery_t **queryp, dns_dispatchevent_t **deventp,
|
||||
dns_adb_adjustsrtt(fctx->adb, query->addrinfo, rtt, factor);
|
||||
}
|
||||
|
||||
/*
|
||||
* Age RTTs of servers not tried.
|
||||
*/
|
||||
if (finish != NULL) {
|
||||
dns_adbfind_t *find;
|
||||
dns_adbaddrinfo_t *addrinfo;
|
||||
|
||||
factor = DNS_ADB_RTTADJAGE;
|
||||
for (find = ISC_LIST_HEAD(fctx->finds);
|
||||
find != NULL;
|
||||
find = ISC_LIST_NEXT(find, publink))
|
||||
for (addrinfo = ISC_LIST_HEAD(find->list);
|
||||
addrinfo != NULL;
|
||||
addrinfo = ISC_LIST_NEXT(addrinfo, publink))
|
||||
if (UNMARKED(addrinfo))
|
||||
dns_adb_adjustsrtt(fctx->adb, addrinfo,
|
||||
0, factor);
|
||||
}
|
||||
|
||||
if (query->dispentry != NULL)
|
||||
dns_dispatch_removeresponse(&query->dispentry, deventp);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user