trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chen...@apache.org
Subject git commit: TS-2185: support to control ClusterCom::sendSharedData frequency
Date Tue, 10 Sep 2013 07:28:10 GMT
Updated Branches:
  refs/heads/master 55f792ee0 -> 0a92bcdcc


TS-2185: support to control ClusterCom::sendSharedData frequency


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

Branch: refs/heads/master
Commit: 0a92bcdccec4e79e1527521a01f2a464a7d6ce28
Parents: 55f792e
Author: Chen Bin <kuotai@taobao.com>
Authored: Tue Sep 10 15:27:21 2013 +0800
Committer: Chen Bin <kuotai@taobao.com>
Committed: Tue Sep 10 15:27:21 2013 +0800

----------------------------------------------------------------------
 CHANGES                    | 2 ++
 mgmt/RecordsConfig.cc      | 2 ++
 mgmt/cluster/ClusterCom.cc | 5 +++++
 mgmt/cluster/ClusterCom.h  | 1 +
 4 files changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0a92bcdc/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index faa6402..e973653 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,8 @@
 Changes with Apache Traffic Server 4.1.0
 
 
+  *) [TS-2185] Support to control ClusterCom::sendSharedData frequency.
+
   *) [TS-2195] Deprecate experimental TSHttpTxnCacheLookupSkip API.
 
   *) [TS-2176] Do not reset value of api_skip_cache_lookup when reading it.

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0a92bcdc/mgmt/RecordsConfig.cc
----------------------------------------------------------------------
diff --git a/mgmt/RecordsConfig.cc b/mgmt/RecordsConfig.cc
index 86ce925..d9e4ab3 100644
--- a/mgmt/RecordsConfig.cc
+++ b/mgmt/RecordsConfig.cc
@@ -215,6 +215,8 @@ RecordElement RecordsConfig[] = {
   ,
   {RECT_CONFIG, "proxy.config.cluster.peer_timeout", RECD_INT, "30", RECU_NULL, RR_NULL,
RECC_NULL, NULL, RECA_NULL}
   ,
+  {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.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/0a92bcdc/mgmt/cluster/ClusterCom.cc
----------------------------------------------------------------------
diff --git a/mgmt/cluster/ClusterCom.cc b/mgmt/cluster/ClusterCom.cc
index a365412..2e3a7e4 100644
--- a/mgmt/cluster/ClusterCom.cc
+++ b/mgmt/cluster/ClusterCom.cc
@@ -423,6 +423,9 @@ ClusterCom::ClusterCom(unsigned long oip, char *host, int mcport, char
*group, i
   peer_timeout = REC_readInteger("proxy.config.cluster.peer_timeout", &found);
   ink_assert(found);
 
+  mc_send_interval = REC_readInteger("proxy.config.cluster.mc_send_interval", &found);
+  ink_assert(found);
+
   /* Launch time */
   startup_time = time(NULL);
 
@@ -1308,6 +1311,8 @@ ClusterCom::sendSharedData(bool send_proxy_heart_beat)
     int time_since_last_send = now - last_shared_send;
     if (last_shared_send != 0 && time_since_last_send > peer_timeout) {
       Warning("multicast send timeout exceeded.  %d seconds since" " last send.", time_since_last_send);
+    } else if (last_shared_send != 0 && time_since_last_send < mc_send_interval)
{
+      return true;
     }
     last_shared_send = now;
   }

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0a92bcdc/mgmt/cluster/ClusterCom.h
----------------------------------------------------------------------
diff --git a/mgmt/cluster/ClusterCom.h b/mgmt/cluster/ClusterCom.h
index 39b10f3..3300336 100644
--- a/mgmt/cluster/ClusterCom.h
+++ b/mgmt/cluster/ClusterCom.h
@@ -152,6 +152,7 @@ public:
 
   time_t delta_thresh;
   time_t peer_timeout;
+  time_t mc_send_interval;
   time_t our_wall_clock;
   time_t startup_timeout;
   time_t startup_time;


Mime
View raw message