Changeset 786
- Timestamp:
- 04/28/06 12:13:44 (4 years ago)
- Location:
- trunk/pdns/pdns
- Files:
-
- 3 modified
-
rec_channel_rec.cc (modified) (1 diff)
-
syncres.cc (modified) (3 diffs)
-
syncres.hh (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pdns/pdns/rec_channel_rec.cc
r739 r786 170 170 addGetStat("throttled-outqueries", &SyncRes::s_throttledqueries); 171 171 addGetStat("throttled-out", &SyncRes::s_throttledqueries); 172 addGetStat("unreachables", &SyncRes::s_unreachables); 172 173 173 174 addGetStat("query-rate", getQueryRate); -
trunk/pdns/pdns/syncres.cc
r785 r786 47 47 unsigned int SyncRes::s_throttledqueries; 48 48 unsigned int SyncRes::s_nodelegated; 49 unsigned int SyncRes::s_unreachables; 50 49 51 SyncRes::domainmap_t SyncRes::s_domainmap; 50 52 string SyncRes::s_serverID; … … 587 589 g_stats.resourceLimits++; 588 590 } 589 else 591 else { 592 s_unreachables++; d_unreachables++; 590 593 LOG<<prefix<<qname<<": error resolving "<< (doTCP ? "over TCP" : "") << endl; 594 } 591 595 592 596 if(resolveret!=-2) { // don't account for resource limits, they are our own fault 593 597 s_nsSpeeds[*tns].submit(1000000, &d_now); // 1 sec 594 s_throttle.throttle(d_now.tv_sec, make_tuple(*remoteIP, qname, qtype.getCode()),20,5); 598 if(resolveret==-1) 599 s_throttle.throttle(d_now.tv_sec, make_tuple(*remoteIP, qname, qtype.getCode()), 60, 100); // unreachable 600 else 601 s_throttle.throttle(d_now.tv_sec, make_tuple(*remoteIP, qname, qtype.getCode()), 20, 5); // timeout 595 602 } 596 603 continue; … … 600 607 wasLame:; // well, it didn't 601 608 LOG<<prefix<<qname<<": status=NS "<<*tns<<" ("<<U32ToIP(*remoteIP)<<") is lame for '"<<auth<<"', trying sibling IP or NS"<<endl; 602 s_throttle.throttle(d_now.tv_sec, make_tuple(*remoteIP, qname, qtype.getCode()), 60,0);609 s_throttle.throttle(d_now.tv_sec, make_tuple(*remoteIP, qname, qtype.getCode()), 60, 100); 603 610 } 604 611 } -
trunk/pdns/pdns/syncres.hh
r785 r786 212 212 { 213 213 public: 214 explicit SyncRes(const struct timeval& now) : d_outqueries(0), d_tcpoutqueries(0), d_throttledqueries(0), d_timeouts(0), d_now(now), 215 d_cacheonly(false), d_nocache(false) { } 214 explicit SyncRes(const struct timeval& now) : d_outqueries(0), d_tcpoutqueries(0), d_throttledqueries(0), d_timeouts(0), d_unreachables(0), 215 d_now(now), 216 d_cacheonly(false), d_nocache(false) { } 216 217 int beginResolve(const string &qname, const QType &qtype, uint16_t qclass, vector<DNSResourceRecord>&ret); 217 218 void setId(int id) … … 238 239 static unsigned int s_tcpoutqueries; 239 240 static unsigned int s_nodelegated; 241 static unsigned int s_unreachables; 240 242 unsigned int d_outqueries; 241 243 unsigned int d_tcpoutqueries; 242 244 unsigned int d_throttledqueries; 243 245 unsigned int d_timeouts; 246 unsigned int d_unreachables; 247 244 248 // typedef map<string,NegCacheEntry> negcache_t; 245 249