MCPcopy Create free account
hub / github.com/apache/trafficserver / is_server_negative_cached

Method is_server_negative_cached

src/proxy/http/HttpTransact.cc:516–536  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

514}
515
516bool
517HttpTransact::is_server_negative_cached(State *s)
518{
519 if (s->dns_info.active && s->dns_info.active->last_fail_time() != TS_TIME_ZERO &&
520 s->dns_info.active->last_fail_time() + s->txn_conf->down_server_timeout > ts_clock::from_time_t(s->client_request_time)) {
521 return true;
522 } else {
523 // Make sure some nasty clock skew has not happened
524 // Use the server timeout to set an upperbound as to how far in the
525 // future we should tolerate bogus last failure times. This sets
526 // the upper bound to the time that we would ever consider a server
527 // down to 2*down_server_timeout
528 if (s->dns_info.active &&
529 ts_clock::from_time_t(s->client_request_time) + s->txn_conf->down_server_timeout < s->dns_info.active->last_fail_time()) {
530 s->dns_info.active->mark_up();
531 ink_assert(!"extreme clock skew");
532 return true;
533 }
534 return false;
535 }
536}
537
538inline static void
539update_current_info(HttpTransact::CurrentInfo *into, HttpTransact::ConnectionAttributes *from,

Callers

nothing calls this directly

Calls 2

last_fail_timeMethod · 0.80
mark_upMethod · 0.80

Tested by

no test coverage detected