You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2018/07/25 22:50:30 UTC
[trafficserver] branch master updated: Revert "Do not do DNS to
origin if the object is HIT-STALE and parent exists"
This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new 52738fb Revert "Do not do DNS to origin if the object is HIT-STALE and parent exists"
52738fb is described below
commit 52738fb50d5f0af82fcf1992559702c8a174a511
Author: Leif Hedstrom <zw...@apache.org>
AuthorDate: Wed Jul 25 11:16:46 2018 -0700
Revert "Do not do DNS to origin if the object is HIT-STALE and parent exists"
This reverts commit a8ec551a846690fee16c3ed5f502de96ac763c79.
See #4009 for details on the crasher that occurs with this original
commit.
---
proxy/http/HttpTransact.cc | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc
index 7a80980..993fec5 100644
--- a/proxy/http/HttpTransact.cc
+++ b/proxy/http/HttpTransact.cc
@@ -2322,7 +2322,16 @@ HttpTransact::HandleCacheOpenReadHitFreshness(State *s)
SET_VIA_STRING(VIA_CACHE_RESULT, VIA_IN_CACHE_STALE);
}
- TRANSACT_RETURN(SM_ACTION_API_CACHE_LOOKUP_COMPLETE, HttpTransact::HandleCacheOpenReadHit);
+ if (!s->force_dns) { // If DNS is not performed before
+ if (need_to_revalidate(s)) {
+ TRANSACT_RETURN(SM_ACTION_API_CACHE_LOOKUP_COMPLETE,
+ CallOSDNSLookup); // content needs to be revalidated and we did not perform a dns ....calling DNS lookup
+ } else { // document can be served can cache
+ TRANSACT_RETURN(SM_ACTION_API_CACHE_LOOKUP_COMPLETE, HttpTransact::HandleCacheOpenReadHit);
+ }
+ } else { // we have done dns . Its up to HandleCacheOpenReadHit to decide to go OS or serve from cache
+ TRANSACT_RETURN(SM_ACTION_API_CACHE_LOOKUP_COMPLETE, HttpTransact::HandleCacheOpenReadHit);
+ }
}
///////////////////////////////////////////////////////////////////////////////