From c7707db477f214714db41d5fcdfd34960be8f3b6 Mon Sep 17 00:00:00 2001 From: Zizhong Zhang Date: Thu, 13 Aug 2020 19:36:51 -0700 Subject: [PATCH] Fix #7116, skip the insertion of the same continuation to pending dns --- iocore/hostdb/HostDB.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/iocore/hostdb/HostDB.cc b/iocore/hostdb/HostDB.cc index b79f74a4bdc..75ad469089d 100644 --- a/iocore/hostdb/HostDB.cc +++ b/iocore/hostdb/HostDB.cc @@ -1586,6 +1586,10 @@ HostDBContinuation::set_check_pending_dns() { Queue &q = hostDB.pending_dns_for_hash(hash.hash); this->setThreadAffinity(this_ethread()); + if (q.in(this)) { + Warning("Skip the insertion of the same continuation to pending dns"); + return false; + } HostDBContinuation *c = q.head; for (; c; c = static_cast(c->link.next)) { if (hash.hash == c->hash.hash) {