You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2013/03/31 03:14:33 UTC

[14/51] git commit: TS-1749: one LOCAL record break the continuity of NODE records

TS-1749: one LOCAL record break the continuity of NODE records

All RECT_NODE Records must be placed continuously! The code depends on it to
calculate offset when reading RECT_NODE records received from other nodes in
the some cluster.

Signed-off-by: Yunkai Zhang <qi...@taobao.com>
Signed-off-by: Zhao Yongming <mi...@gmail.com>


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

Branch: refs/heads/3.3.x
Commit: 4c6bff31cc4b6a60481acc3c3a369521974aa6cb
Parents: 8961f12
Author: Yunkai Zhang <qi...@taobao.com>
Authored: Tue Mar 19 14:53:48 2013 +0800
Committer: Zhao Yongming <mi...@gmail.com>
Committed: Wed Mar 20 11:29:47 2013 +0800

----------------------------------------------------------------------
 CHANGES                    |    3 +++
 mgmt/RecordsConfig.cc      |   27 +++++++++++++++------------
 mgmt/cluster/ClusterCom.cc |    4 ++++
 3 files changed, 22 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/4c6bff31/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 10945ab..3f3389e 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@
   Changes with Apache Traffic Server 3.3.2
 
 
+  *) [TS-1749] Stats cluster values among nodes are not consistent.
+   Author: Yunkai Zhang <qi...@taobao.com>
+
   *) [TS-1758] Remove unused overviewPage aggregation functions.
    Author: Yunkai Zhang.
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/4c6bff31/mgmt/RecordsConfig.cc
----------------------------------------------------------------------
diff --git a/mgmt/RecordsConfig.cc b/mgmt/RecordsConfig.cc
index 1c2a88e..a09195d 100644
--- a/mgmt/RecordsConfig.cc
+++ b/mgmt/RecordsConfig.cc
@@ -1403,6 +1403,8 @@ RecordElement RecordsConfig[] = {
   //#
   //# <RECORD-TYPE> <NAME> <TYPE> <VALUE (till end of line)>
   //#
+  //# *NOTE*: All NODE Records must be placed continuously!
+  //#
   //# Add NODE       Records Here
   //##############################################################################
   {RECT_NODE, "proxy.node.num_processes", RECD_INT, "0", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
@@ -1441,18 +1443,6 @@ RecordElement RecordsConfig[] = {
   ,
 
   //#
-  //# SSL parent proxying info
-  //#
-  //# Set the value of this variable to 1 if this node
-  //#  is also the default parent for all ssl requests
-  //#  in a cluster. Setting the value to 1 will prevent
-  //#  SSL requests from this proxy to a parent from
-  //#  self-looping.
-  //#
-  {RECT_LOCAL, "proxy.local.http.parent_proxy.disable_connect_tunneling", RECD_INT, "0", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
-  ,
-
-  //#
   //# Dash Board Stats
   //#
   //# Valid Per Node - Can Not Sum For Cluster Stats
@@ -1848,6 +1838,19 @@ RecordElement RecordsConfig[] = {
   ,
   {RECT_CLUSTER, "proxy.cluster.current_server_connections", RECD_INT, "0", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
   ,
+
+  //#
+  //# SSL parent proxying info
+  //#
+  //# Set the value of this variable to 1 if this node
+  //#  is also the default parent for all ssl requests
+  //#  in a cluster. Setting the value to 1 will prevent
+  //#  SSL requests from this proxy to a parent from
+  //#  self-looping.
+  //#
+  {RECT_LOCAL, "proxy.local.http.parent_proxy.disable_connect_tunneling", RECD_INT, "0", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  ,
+
   //# Add LOCAL Records Here
   {RECT_LOCAL, "proxy.local.incoming_ip_to_bind", RECD_STRING, NULL, RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
   ,

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/4c6bff31/mgmt/cluster/ClusterCom.cc
----------------------------------------------------------------------
diff --git a/mgmt/cluster/ClusterCom.cc b/mgmt/cluster/ClusterCom.cc
index 451f77f..157b5dc 100644
--- a/mgmt/cluster/ClusterCom.cc
+++ b/mgmt/cluster/ClusterCom.cc
@@ -811,6 +811,10 @@ ClusterCom::handleMultiCastMessage(char *message)
     for (int j = 0; j < g_num_records; j++) {
       RecRecord *rec = &(g_records[j]);
 
+      /*
+       * The following code make sence only when RECT_NODE records
+       * defined in mgmt/RecordsConfig.cc are placed continuously.
+       */
       if (rec->rec_type == RECT_NODE) {
         p->node_rec_data.recs[cnt].rec_type = rec->rec_type;
         p->node_rec_data.recs[cnt].name = rec->name;