trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpe...@apache.org
Subject [trafficserver] branch master updated: TS-4898: Switch proxy.config.hostdb.timeout from minutes to seconds.
Date Tue, 27 Sep 2016 17:17:06 GMT
This is an automated email from the ASF dual-hosted git repository.

jpeach pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/trafficserver.git

The following commit(s) were added to refs/heads/master by this push:
       new  c39c0a0   TS-4898: Switch proxy.config.hostdb.timeout from minutes to seconds.
c39c0a0 is described below

commit c39c0a0ca80100bfe571ccb43dc514c0351bf7b9
Author: James Peach <jpeach@apache.org>
AuthorDate: Tue Sep 27 09:44:32 2016 -0700

    TS-4898: Switch proxy.config.hostdb.timeout from minutes to seconds.
---
 doc/admin-guide/files/records.config.en.rst | 10 +++++-----
 iocore/hostdb/HostDB.cc                     | 12 +++++++-----
 mgmt/RecordsConfig.cc                       |  2 +-
 3 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/doc/admin-guide/files/records.config.en.rst b/doc/admin-guide/files/records.config.en.rst
index 4d9a13b..199ffaa 100644
--- a/doc/admin-guide/files/records.config.en.rst
+++ b/doc/admin-guide/files/records.config.en.rst
@@ -2388,14 +2388,14 @@ HostDB
    ===== ======================================================================
 
 .. ts:cv:: CONFIG proxy.config.hostdb.timeout INT 1440
-   :units: minutes
+   :units: seconds
    :reloadable:
 
-   Internal time to live value for host DB entries, **in minutes**.
-
-   See :ts:cv:`proxy.config.hostdb.ttl_mode` for when this value is used.
+   Internal time to live value for host DB entries in seconds.
 
-   See :ref:`admin-performance-timeouts` for more discussion on |TS| timeouts.
+   See :ts:cv:`proxy.config.hostdb.ttl_mode` for when this value
+   is used.  See :ref:`admin-performance-timeouts` for more discussion
+   on |TS| timeouts.
 
 .. ts:cv:: CONFIG proxy.config.hostdb.fail.timeout INT 0
 
diff --git a/iocore/hostdb/HostDB.cc b/iocore/hostdb/HostDB.cc
index 918d69e..b367b1b 100644
--- a/iocore/hostdb/HostDB.cc
+++ b/iocore/hostdb/HostDB.cc
@@ -1084,15 +1084,17 @@ HostDBContinuation::lookup_done(IpAddr const &ip, char const *aname,
bool around
     case TTL_OBEY:
       break;
     case TTL_IGNORE:
-      ttl_seconds = hostdb_ip_timeout_interval * 60;
+      ttl_seconds = hostdb_ip_timeout_interval;
       break;
     case TTL_MIN:
-      if (hostdb_ip_timeout_interval * 60 < ttl_seconds)
-        ttl_seconds = hostdb_ip_timeout_interval * 60;
+      if (hostdb_ip_timeout_interval < ttl_seconds) {
+        ttl_seconds = hostdb_ip_timeout_interval;
+      }
       break;
     case TTL_MAX:
-      if (hostdb_ip_timeout_interval * 60 > ttl_seconds)
-        ttl_seconds = hostdb_ip_timeout_interval * 60;
+      if (hostdb_ip_timeout_interval > ttl_seconds) {
+        ttl_seconds = hostdb_ip_timeout_interval;
+      }
       break;
     }
     HOSTDB_SUM_DYN_STAT(hostdb_ttl_stat, ttl_seconds);
diff --git a/mgmt/RecordsConfig.cc b/mgmt/RecordsConfig.cc
index f82f807..23d27ab 100644
--- a/mgmt/RecordsConfig.cc
+++ b/mgmt/RecordsConfig.cc
@@ -1056,7 +1056,7 @@ static const RecordElement RecordsConfig[] =
   ,
   {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}
+  {RECT_CONFIG, "proxy.config.hostdb.timeout", RECD_INT, "86400", RECU_DYNAMIC, RR_NULL,
RECC_STR, "^[0-9]+$", RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.hostdb.verify_after", RECD_INT, "720", RECU_DYNAMIC, RR_NULL,
RECC_NULL, NULL, RECA_NULL}
   ,

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <commits@trafficserver.apache.org>'].

Mime
View raw message