shinrich commented on a change in pull request #7276:
URL: https://github.com/apache/trafficserver/pull/7276#discussion_r512659302



##########
File path: proxy/http/HttpTransact.cc
##########
@@ -1856,12 +1852,9 @@ HttpTransact::ReDNSRoundRobin(State *s)
 void
 HttpTransact::OSDNSLookup(State *s)
 {
-  static const int max_dns_lookups = 3;
-
   ink_assert(s->dns_info.looking_up == ORIGIN_SERVER);
 
-  TxnDebug("http_trans", "[HttpTransact::OSDNSLookup] This was attempt %d", 
s->dns_info.attempts);

Review comment:
       I removed DNS_ATTEMPTS_EXHAUSTED because the current 
try_to_expand_host_name() never returns that.  It only returns 
EXPANSION_NOT_ALLOWED in the non-parent selection case or RETRY_EXPANDED_NAME 
in the parent selection case.  So got rid of the extra cases and inlined the 
contents of try_to_expand host name.
   
   With the most of the expandomatic logic gone, only the parent select case 
exercises this path, and it will only exercise it once to check the IP address 
of the parent machine rather than the parent path directly (here is where my 
knowledge of why the parent select logic flips over to OSDNSLookup becomes 
shakey).
   
   The underlying DNS lookup logic in iocore/DNS will still do multiple DNS 
requests. 
   
   The origin server look up logic will pass through OSDNSLookup multiple times 
for a transaction if the connection for an IP address fails . Then OSDNSLookup 
will be triggered again and either the same address is selected again or if it 
failed too many times, the logic will move onto the next address (assuming DNS 
returns multiple addresses for the name)




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to