TS-1637: Fix nodes as idle/dead if we have not heard from them in awhile
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/cb9b0ffd Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/cb9b0ffd Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/cb9b0ffd Branch: refs/heads/5.0.x Commit: cb9b0ffd8e9b4fb0f1b6909918abb2894eb76217 Parents: 0a92bcd Author: Chen Bin <[email protected]> Authored: Tue Sep 10 15:54:05 2013 +0800 Committer: Chen Bin <[email protected]> Committed: Tue Sep 10 15:54:05 2013 +0800 ---------------------------------------------------------------------- CHANGES | 2 ++ mgmt/RecordsConfig.cc | 2 ++ mgmt/cluster/ClusterCom.cc | 5 ++++- mgmt/cluster/ClusterCom.h | 1 + 4 files changed, 9 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb9b0ffd/CHANGES ---------------------------------------------------------------------- diff --git a/CHANGES b/CHANGES index e973653..868829d 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,8 @@ Changes with Apache Traffic Server 4.1.0 + *) [TS-1637] Fix nodes as idle/dead if we have not heard from them in awhile + *) [TS-2185] Support to control ClusterCom::sendSharedData frequency. *) [TS-2195] Deprecate experimental TSHttpTxnCacheLookupSkip API. http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb9b0ffd/mgmt/RecordsConfig.cc ---------------------------------------------------------------------- diff --git a/mgmt/RecordsConfig.cc b/mgmt/RecordsConfig.cc index d9e4ab3..201216d 100644 --- a/mgmt/RecordsConfig.cc +++ b/mgmt/RecordsConfig.cc @@ -217,6 +217,8 @@ RecordElement RecordsConfig[] = { , {RECT_CONFIG, "proxy.config.cluster.mc_send_interval", RECD_INT, "2", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL} , + {RECT_CONFIG, "proxy.config.cluster.mc_poll_timeout", RECD_INT, "5", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL} + , {RECT_CONFIG, "proxy.config.cluster.startup_timeout", RECD_INT, "10", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL} , //# cluster type requires restart to change http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb9b0ffd/mgmt/cluster/ClusterCom.cc ---------------------------------------------------------------------- diff --git a/mgmt/cluster/ClusterCom.cc b/mgmt/cluster/ClusterCom.cc index 2e3a7e4..430e01b 100644 --- a/mgmt/cluster/ClusterCom.cc +++ b/mgmt/cluster/ClusterCom.cc @@ -104,7 +104,7 @@ drainIncomingChannel(void *arg) // linux: set tv.tv_set in select() loop, since linux's select() // will update tv with the amount of time not slept (most other // implementations do not do this) - tv.tv_sec = 30; // interface not-responding timeout + tv.tv_sec = lmgmt->ccom->mc_poll_timeout; // interface not-responding timeout tv.tv_usec = 0; memset(message, 0, 61440); @@ -426,6 +426,9 @@ ClusterCom::ClusterCom(unsigned long oip, char *host, int mcport, char *group, i mc_send_interval = REC_readInteger("proxy.config.cluster.mc_send_interval", &found); ink_assert(found); + mc_poll_timeout = REC_readInteger("proxy.config.cluster.mc_poll_timeout", &found); + ink_assert(found); + /* Launch time */ startup_time = time(NULL); http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb9b0ffd/mgmt/cluster/ClusterCom.h ---------------------------------------------------------------------- diff --git a/mgmt/cluster/ClusterCom.h b/mgmt/cluster/ClusterCom.h index 3300336..4dda298 100644 --- a/mgmt/cluster/ClusterCom.h +++ b/mgmt/cluster/ClusterCom.h @@ -153,6 +153,7 @@ public: time_t delta_thresh; time_t peer_timeout; time_t mc_send_interval; + time_t mc_poll_timeout; time_t our_wall_clock; time_t startup_timeout; time_t startup_time;
