Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions iocore/hostdb/HostDB.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1109,11 +1109,20 @@ HostDBContinuation::dnsEvent(int event, HostEnt *e)
}
EThread *thread = mutex->thread_holding;
if (event != DNS_EVENT_LOOKUP) {
// This was an event_interval or an event_immediate
// Either we timed out, or remove_trigger_pending gave up on us
// Event should be immediate or interval.
if (!action.continuation) {
// give up on insert, it has been too long
hostDB.pending_dns_for_hash(hash.hash).remove(this);
// Nothing to do, give up.
if (event == EVENT_INTERVAL) {
// Timeout - clear all queries queued up for this FQDN because none of the other ones have sent an
// actual DNS query. If the request rate is high enough this can cause a persistent queue where the
// DNS query is never sent and all requests timeout, even if it was a transient error.
// See issue #8417.
remove_trigger_pending_dns();
} else {
// "local" signal to give up, usually due this being one of those "other" queries.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: "usually due to this..."

// That generally means @a this has already been removed from the queue, but just in case...
hostDB.pending_dns_for_hash(hash.hash).remove(this);
}
hostdb_cont_free(this);
return EVENT_DONE;
}
Expand Down