You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by jp...@apache.org on 2016/09/27 17:17:06 UTC
[trafficserver] branch master updated: TS-4898: Switch
proxy.config.hostdb.timeout from minutes to seconds.
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 <jp...@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" <co...@trafficserver.apache.org>'].