[ 
https://issues.apache.org/jira/browse/TS-4436?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15317134#comment-15317134
 ] 

ASF GitHub Bot commented on TS-4436:
------------------------------------

Github user SolidWallOfCode commented on a diff in the pull request:

    https://github.com/apache/trafficserver/pull/631#discussion_r65959288
  
    --- Diff: iocore/hostdb/HostDB.cc ---
    @@ -1998,6 +1988,19 @@ HostDBContinuation::do_dns()
           hostdb_cont_free(this);
           return;
         }
    +    ts::ConstBuffer hname(md5.host_name, md5.host_len);
    +    Ptr<RefCountedHostsFileMap> current_host_file_map = 
hostDB.hosts_file_ptr;
    +    HostsFileMap::iterator find_result = 
current_host_file_map->hosts_file_map.find(hname);
    +    if (find_result != current_host_file_map->hosts_file_map.end()) {
    +      if (action.continuation) {
    +        // Set the TTL based on how much time remains until the next sync
    +        HostDBInfo *r = lookup_done(IpAddr(find_result->second), 
md5.host_name, false,
    +                                    current_host_file_map->next_sync_time 
- Thread::get_hrtime(), NULL);
    --- End diff --
    
    Isn't that value to `lookup_done` TTL in seconds, not nanoseconds?


> ATS' tracking of host failures is broken for entries acquired through the 
> hosts file
> ------------------------------------------------------------------------------------
>
>                 Key: TS-4436
>                 URL: https://issues.apache.org/jira/browse/TS-4436
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: HostDB
>            Reporter: Thomas Jackson
>            Assignee: Thomas Jackson
>             Fix For: 7.0.0
>
>
> The current implementation of the hosts file maintains a map of name to 
> hostdbinfo, which means that any lookups that come into the probe method 
> return the same hostdbinfo struct. This means that any requests to a given 
> address (regardless of port) recieve the same HostDBInfo struct-- which in 
> turn means that the up/down status is global to the IP instead of per ip/port 
> pair.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to