Repository: trafficserver
Updated Branches:
  refs/heads/master 73b0b4f0d -> e6f28e18f


TS-3462 Reduce the HostDB lookup timeout to 30s


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/2c1974cf
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/2c1974cf
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/2c1974cf

Branch: refs/heads/master
Commit: 2c1974cf162a7303697c3a58415ca8c5929eade4
Parents: 73b0b4f
Author: Leif Hedstrom <[email protected]>
Authored: Mon Jun 8 13:13:38 2015 -0600
Committer: Leif Hedstrom <[email protected]>
Committed: Tue Jun 9 11:50:43 2015 -0600

----------------------------------------------------------------------
 doc/reference/configuration/records.config.en.rst | 2 +-
 iocore/hostdb/HostDB.cc                           | 7 ++++---
 mgmt/RecordsConfig.cc                             | 2 +-
 3 files changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2c1974cf/doc/reference/configuration/records.config.en.rst
----------------------------------------------------------------------
diff --git a/doc/reference/configuration/records.config.en.rst 
b/doc/reference/configuration/records.config.en.rst
index 451e0e2..c1801b6 100644
--- a/doc/reference/configuration/records.config.en.rst
+++ b/doc/reference/configuration/records.config.en.rst
@@ -1756,7 +1756,7 @@ hostname to ``host_x.y.com``.
 HostDB
 ======
 
-.. ts:cv:: CONFIG proxy.config.hostdb.lookup_timeout INT 120
+.. ts:cv:: CONFIG proxy.config.hostdb.lookup_timeout INT 30
    :metric: seconds
    :reloadable:
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2c1974cf/iocore/hostdb/HostDB.cc
----------------------------------------------------------------------
diff --git a/iocore/hostdb/HostDB.cc b/iocore/hostdb/HostDB.cc
index a7f5c55..7016f5e 100644
--- a/iocore/hostdb/HostDB.cc
+++ b/iocore/hostdb/HostDB.cc
@@ -46,7 +46,7 @@ int hostdb_enable = true;
 int hostdb_migrate_on_demand = true;
 int hostdb_cluster = false;
 int hostdb_cluster_round_robin = false;
-int hostdb_lookup_timeout = 120;
+int hostdb_lookup_timeout = 30;
 int hostdb_insert_timeout = 160;
 int hostdb_re_dns_on_reload = false;
 int hostdb_ttl_mode = TTL_OBEY;
@@ -1888,10 +1888,11 @@ HostDBContinuation::do_dns()
       return;
     }
   }
-  if (hostdb_lookup_timeout)
+  if (hostdb_lookup_timeout) {
     timeout = mutex->thread_holding->schedule_in(this, 
HRTIME_SECONDS(hostdb_lookup_timeout));
-  else
+  } else {
     timeout = NULL;
+  }
   if (set_check_pending_dns()) {
     DNSProcessor::Options opt;
     opt.timeout = dns_lookup_timeout;

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2c1974cf/mgmt/RecordsConfig.cc
----------------------------------------------------------------------
diff --git a/mgmt/RecordsConfig.cc b/mgmt/RecordsConfig.cc
index 5aa03b6..f8577d1 100644
--- a/mgmt/RecordsConfig.cc
+++ b/mgmt/RecordsConfig.cc
@@ -1028,7 +1028,7 @@ static const RecordElement RecordsConfig[] =
   //       #  0 = obey, 1 = ignore, 2 = min(X,ttl), 3 = max(X,ttl)
   {RECT_CONFIG, "proxy.config.hostdb.ttl_mode", RECD_INT, "0", RECU_DYNAMIC, 
RR_NULL, RECC_NULL, "[0-3]", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.hostdb.lookup_timeout", RECD_INT, "120", 
RECU_DYNAMIC, RR_NULL, RECC_STR, "^[0-9]+$", RECA_NULL}
+  {RECT_CONFIG, "proxy.config.hostdb.lookup_timeout", RECD_INT, "30", 
RECU_DYNAMIC, RR_NULL, RECC_STR, "^[0-9]+$", RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.hostdb.timeout", RECD_INT, "1440", RECU_DYNAMIC, 
RR_NULL, RECC_STR, "^[0-9]+$", RECA_NULL}
   ,

Reply via email to