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

    https://github.com/apache/trafficserver/pull/240#discussion_r33811976
  
    --- Diff: iocore/hostdb/HostDB.cc ---
    @@ -659,6 +660,20 @@ db_mark_for(IpAddr const &ip)
     HostDBInfo *
     probe(ProxyMutex *mutex, HostDBMD5 const &md5, bool ignore_timeout)
     {
    +  // If we have an entry in our hosts file, we don't need to bother with 
DNS
    +  Ptr<RefCountedHostsFileMap> current_host_file_map = 
hostDB.hosts_file_ptr;
    +
    +  std::string hname(md5.host_name);
    +  if (current_host_file_map->hosts_file_map.find(hname) != 
current_host_file_map->hosts_file_map.end()) {
    +    // TODO: Something to make this not local :/
    +    static HostDBInfo r;
    +    r.round_robin = false;
    +    r.reverse_dns = false;
    +    r.is_srv = false;
    +    ats_ip_set(r.ip(), current_host_file_map->hosts_file_map[hname]);
    --- End diff --
    
    Would that be better than worrying about concurrent access of said iterator?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to