mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-11 04:50:01 -04:00
Fix the fetches-per-server quota calculation
Since commitbad5a523c2, when the fetches-per-server quota was increased or decreased, instead of the value being set to the newly calculated quota, it was set to the *minimum* of the new quota or 1 - which effectively meant it was always set to 1. it should instead have been the maximum, to prevent the value from ever dropping to zero. (cherry picked from commit694bc50273)
This commit is contained in:
parent
eaf5745554
commit
bca7f19541
1 changed files with 2 additions and 2 deletions
|
|
@ -4261,7 +4261,7 @@ maybe_adjust_quota(dns_adb_t *adb, dns_adbaddrinfo_t *addr, bool timeout) {
|
|||
uint_fast32_t new_quota =
|
||||
adb->quota * quota_adj[--addr->entry->mode] / 10000;
|
||||
atomic_store_release(&addr->entry->quota,
|
||||
ISC_MIN(1, new_quota));
|
||||
ISC_MAX(1, new_quota));
|
||||
log_quota(addr->entry,
|
||||
"atr %0.2f, quota increased to %" PRIuFAST32,
|
||||
addr->entry->atr, new_quota);
|
||||
|
|
@ -4271,7 +4271,7 @@ maybe_adjust_quota(dns_adb_t *adb, dns_adbaddrinfo_t *addr, bool timeout) {
|
|||
uint_fast32_t new_quota =
|
||||
adb->quota * quota_adj[++addr->entry->mode] / 10000;
|
||||
atomic_store_release(&addr->entry->quota,
|
||||
ISC_MIN(1, new_quota));
|
||||
ISC_MAX(1, new_quota));
|
||||
log_quota(addr->entry,
|
||||
"atr %0.2f, quota decreased to %" PRIuFAST32,
|
||||
addr->entry->atr, new_quota);
|
||||
|
|
|
|||
Loading…
Reference in a new issue