From: Bert Hubert Date: Wed, 29 Dec 2010 08:58:54 +0000 (+0000) Subject: our 'throttle' code would do one final 'throttle' long after the time limit had expir... X-Git-Tag: auth-3.0~481 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=139c291196eaf7505540631d4ce4c123e5a5a5f4;p=pdns our 'throttle' code would do one final 'throttle' long after the time limit had expired + make our throttling on timeouts a bit less aggressive git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1766 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- diff --git a/pdns/syncres.cc b/pdns/syncres.cc index 4b05acfc5..f1532066a 100644 --- a/pdns/syncres.cc +++ b/pdns/syncres.cc @@ -904,9 +904,9 @@ int SyncRes::doResolveAt(set nameservers, string auth, t_sstorage->nsSpeeds[*tns].submit(*remoteIP, 1000000, &d_now); // 1 sec } if(resolveret==-1) - t_sstorage->throttle.throttle(d_now.tv_sec, make_tuple(*remoteIP, qname, qtype.getCode()), 60, 100); // unreachable + t_sstorage->throttle.throttle(d_now.tv_sec, make_tuple(*remoteIP, qname, qtype.getCode()), 60, 100); // unreachable, 1 minute or 100 queries else - t_sstorage->throttle.throttle(d_now.tv_sec, make_tuple(*remoteIP, qname, qtype.getCode()), 20, 5); // timeout + t_sstorage->throttle.throttle(d_now.tv_sec, make_tuple(*remoteIP, qname, qtype.getCode()), 10, 5); // timeout } continue; } @@ -914,7 +914,7 @@ int SyncRes::doResolveAt(set nameservers, string auth, break; // this IP address worked! wasLame:; // well, it didn't LOG<toString() <<") is lame for '"<throttle.throttle(d_now.tv_sec, make_tuple(*remoteIP, qname, qtype.getCode()), 60, 100); + t_sstorage->throttle.throttle(d_now.tv_sec, make_tuple(*remoteIP, qname, qtype.getCode()), 60, 100); // lame } } @@ -933,7 +933,7 @@ int SyncRes::doResolveAt(set nameservers, string auth, if(lwr.d_rcode==RCode::ServFail) { LOG<throttle.throttle(d_now.tv_sec,make_tuple(*remoteIP, qname, qtype.getCode()),60,3); + t_sstorage->throttle.throttle(d_now.tv_sec,make_tuple(*remoteIP, qname, qtype.getCode()),60,3); // servfail continue; } LOG<toString() <<"), rcode="< i->second.ttd || i->second.count-- < 0) { d_cont.erase(i); + return false; } return true; // still listed, still blocked