trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpe...@apache.org
Subject [3/5] git commit: TS-2519: Stop using the ambiguous RECP_NULL
Date Mon, 27 Jan 2014 19:49:23 GMT
TS-2519: Stop using the ambiguous RECP_NULL

RECP_NULL is ambigious. Should stats with this prsistence type be
saved or not?

The current behavior is that all stats that are not RECP_NON_PERSISTENT
are persisted. Change all registrations of RECP_NULL stats to use
RECP_PERSISTENT instead. Change the build version stats to
RECP_NON_PERSISTENT, since we want these to update when Traffic
Server is upgraded.


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

Branch: refs/heads/master
Commit: 7352493c9ac8e349088fdcf840ac67915196bedc
Parents: 6215bf9
Author: James Peach <jpeach@apache.org>
Authored: Wed Jan 22 21:46:13 2014 -0800
Committer: James Peach <jpeach@apache.org>
Committed: Mon Jan 27 09:30:14 2014 -0800

----------------------------------------------------------------------
 iocore/aio/AIO.cc                 |   8 +-
 iocore/dns/DNS.cc                 |  14 +-
 iocore/hostdb/HostDB.cc           |  12 +-
 iocore/net/Net.cc                 |  28 +--
 lib/records/test_RecProcess.i     |  12 +-
 lib/records/test_RecordsConfig.cc |  10 +-
 mgmt/BaseManager.h                |   2 +-
 mgmt/LocalManager.cc              |  29 ---
 proxy/ICPStats.cc                 |  52 ++--
 proxy/InkAPI.cc                   |  12 +-
 proxy/Main.cc                     |  14 +-
 proxy/SocksProxy.cc               |   4 +-
 proxy/http/HttpConfig.cc          | 440 ++++++++++++++++-----------------
 proxy/logging/LogStandalone.cc    |  19 +-
 14 files changed, 317 insertions(+), 339 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7352493c/iocore/aio/AIO.cc
----------------------------------------------------------------------
diff --git a/iocore/aio/AIO.cc b/iocore/aio/AIO.cc
index f8c1b9d..a64918a 100644
--- a/iocore/aio/AIO.cc
+++ b/iocore/aio/AIO.cc
@@ -150,15 +150,15 @@ ink_aio_init(ModuleVersion v)
 
   aio_rsb = RecAllocateRawStatBlock((int) AIO_STAT_COUNT);
   RecRegisterRawStat(aio_rsb, RECT_PROCESS, "proxy.process.cache.read_per_sec",
-                     RECD_FLOAT, RECP_NULL, (int) AIO_STAT_READ_PER_SEC, aio_stats_cb);
+                     RECD_FLOAT, RECP_PERSISTENT, (int) AIO_STAT_READ_PER_SEC, aio_stats_cb);
   RecRegisterRawStat(aio_rsb, RECT_PROCESS, "proxy.process.cache.write_per_sec",
-                     RECD_FLOAT, RECP_NULL, (int) AIO_STAT_WRITE_PER_SEC, aio_stats_cb);
+                     RECD_FLOAT, RECP_PERSISTENT, (int) AIO_STAT_WRITE_PER_SEC, aio_stats_cb);
   RecRegisterRawStat(aio_rsb, RECT_PROCESS,
                      "proxy.process.cache.KB_read_per_sec",
-                     RECD_FLOAT, RECP_NULL, (int) AIO_STAT_KB_READ_PER_SEC, aio_stats_cb);
+                     RECD_FLOAT, RECP_PERSISTENT, (int) AIO_STAT_KB_READ_PER_SEC, aio_stats_cb);
   RecRegisterRawStat(aio_rsb, RECT_PROCESS,
                      "proxy.process.cache.KB_write_per_sec",
-                     RECD_FLOAT, RECP_NULL, (int) AIO_STAT_KB_WRITE_PER_SEC, aio_stats_cb);
+                     RECD_FLOAT, RECP_PERSISTENT, (int) AIO_STAT_KB_WRITE_PER_SEC, aio_stats_cb);
 #if AIO_MODE != AIO_MODE_NATIVE
   memset(&aio_reqs, 0, MAX_DISKS_POSSIBLE * sizeof(AIO_Reqs *));
   ink_mutex_init(&insert_mutex, NULL);

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7352493c/iocore/dns/DNS.cc
----------------------------------------------------------------------
diff --git a/iocore/dns/DNS.cc b/iocore/dns/DNS.cc
index 0a7d7cf..74d972e 100644
--- a/iocore/dns/DNS.cc
+++ b/iocore/dns/DNS.cc
@@ -1629,11 +1629,11 @@ ink_dns_init(ModuleVersion v)
   //
   RecRegisterRawStat(dns_rsb, RECT_PROCESS,
                      "proxy.process.dns.total_dns_lookups",
-                     RECD_INT, RECP_NULL, (int) dns_total_lookups_stat, RecRawStatSyncSum);
+                     RECD_INT, RECP_PERSISTENT, (int) dns_total_lookups_stat, RecRawStatSyncSum);
 
   RecRegisterRawStat(dns_rsb, RECT_PROCESS,
                      "proxy.process.dns.lookup_avg_time",
-                     RECD_INT, RECP_NULL, (int) dns_response_time_stat, RecRawStatSyncHrTimeAvg);
+                     RECD_INT, RECP_PERSISTENT, (int) dns_response_time_stat, RecRawStatSyncHrTimeAvg);
 
   RecRegisterRawStat(dns_rsb, RECT_PROCESS,
                      "proxy.process.dns.success_avg_time",
@@ -1641,22 +1641,22 @@ ink_dns_init(ModuleVersion v)
 
   RecRegisterRawStat(dns_rsb, RECT_PROCESS,
                      "proxy.process.dns.lookup_successes",
-                     RECD_INT, RECP_NULL, (int) dns_lookup_success_stat, RecRawStatSyncSum);
+                     RECD_INT, RECP_PERSISTENT, (int) dns_lookup_success_stat, RecRawStatSyncSum);
 
   RecRegisterRawStat(dns_rsb, RECT_PROCESS,
                      "proxy.process.dns.fail_avg_time",
-                     RECD_INT, RECP_NULL, (int) dns_fail_time_stat, RecRawStatSyncHrTimeAvg);
+                     RECD_INT, RECP_PERSISTENT, (int) dns_fail_time_stat, RecRawStatSyncHrTimeAvg);
 
   RecRegisterRawStat(dns_rsb, RECT_PROCESS,
                      "proxy.process.dns.lookup_failures",
-                     RECD_INT, RECP_NULL, (int) dns_lookup_fail_stat, RecRawStatSyncSum);
+                     RECD_INT, RECP_PERSISTENT, (int) dns_lookup_fail_stat, RecRawStatSyncSum);
 
   RecRegisterRawStat(dns_rsb, RECT_PROCESS,
-                     "proxy.process.dns.retries", RECD_INT, RECP_NULL, (int) dns_retries_stat,
RecRawStatSyncSum);
+                     "proxy.process.dns.retries", RECD_INT, RECP_PERSISTENT, (int) dns_retries_stat,
RecRawStatSyncSum);
 
   RecRegisterRawStat(dns_rsb, RECT_PROCESS,
                      "proxy.process.dns.max_retries_exceeded",
-                     RECD_INT, RECP_NULL, (int) dns_max_retries_exceeded_stat, RecRawStatSyncSum);
+                     RECD_INT, RECP_PERSISTENT, (int) dns_max_retries_exceeded_stat, RecRawStatSyncSum);
 
   RecRegisterRawStat(dns_rsb, RECT_PROCESS,
                      "proxy.process.dns.in_flight",

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7352493c/iocore/hostdb/HostDB.cc
----------------------------------------------------------------------
diff --git a/iocore/hostdb/HostDB.cc b/iocore/hostdb/HostDB.cc
index d2c5e76..e4adbe0 100644
--- a/iocore/hostdb/HostDB.cc
+++ b/iocore/hostdb/HostDB.cc
@@ -2459,29 +2459,29 @@ ink_hostdb_init(ModuleVersion v)
 
   RecRegisterRawStat(hostdb_rsb, RECT_PROCESS,
                      "proxy.process.hostdb.total_entries",
-                     RECD_INT, RECP_NULL, (int) hostdb_total_entries_stat, RecRawStatSyncCount);
+                     RECD_INT, RECP_PERSISTENT, (int) hostdb_total_entries_stat, RecRawStatSyncCount);
 
   RecRegisterRawStat(hostdb_rsb, RECT_PROCESS,
                      "proxy.process.hostdb.total_lookups",
-                     RECD_INT, RECP_NULL, (int) hostdb_total_lookups_stat, RecRawStatSyncSum);
+                     RECD_INT, RECP_PERSISTENT, (int) hostdb_total_lookups_stat, RecRawStatSyncSum);
 
   RecRegisterRawStat(hostdb_rsb, RECT_PROCESS,
                      "proxy.process.hostdb.total_hits",
                      RECD_INT, RECP_NON_PERSISTENT, (int) hostdb_total_hits_stat, RecRawStatSyncSum);
 
   RecRegisterRawStat(hostdb_rsb, RECT_PROCESS,
-                     "proxy.process.hostdb.ttl", RECD_FLOAT, RECP_NULL, (int) hostdb_ttl_stat,
RecRawStatSyncAvg);
+                     "proxy.process.hostdb.ttl", RECD_FLOAT, RECP_PERSISTENT, (int) hostdb_ttl_stat,
RecRawStatSyncAvg);
 
   RecRegisterRawStat(hostdb_rsb, RECT_PROCESS,
                      "proxy.process.hostdb.ttl_expires",
-                     RECD_INT, RECP_NULL, (int) hostdb_ttl_expires_stat, RecRawStatSyncSum);
+                     RECD_INT, RECP_PERSISTENT, (int) hostdb_ttl_expires_stat, RecRawStatSyncSum);
 
   RecRegisterRawStat(hostdb_rsb, RECT_PROCESS,
                      "proxy.process.hostdb.re_dns_on_reload",
-                     RECD_INT, RECP_NULL, (int) hostdb_re_dns_on_reload_stat, RecRawStatSyncSum);
+                     RECD_INT, RECP_PERSISTENT, (int) hostdb_re_dns_on_reload_stat, RecRawStatSyncSum);
 
   RecRegisterRawStat(hostdb_rsb, RECT_PROCESS,
-                     "proxy.process.hostdb.bytes", RECD_INT, RECP_NULL, (int) hostdb_bytes_stat,
RecRawStatSyncCount);
+                     "proxy.process.hostdb.bytes", RECD_INT, RECP_PERSISTENT, (int) hostdb_bytes_stat,
RecRawStatSyncCount);
 
   ts_host_res_global_init();
 }

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7352493c/iocore/net/Net.cc
----------------------------------------------------------------------
diff --git a/iocore/net/Net.cc b/iocore/net/Net.cc
index 485aef1..11c0c48 100644
--- a/iocore/net/Net.cc
+++ b/iocore/net/Net.cc
@@ -49,14 +49,14 @@ register_net_stats()
   // Register statistics
   //
   RecRegisterRawStat(net_rsb, RECT_PROCESS, "proxy.process.net.net_handler_run",
-                     RECD_INT, RECP_NULL, (int) net_handler_run_stat, RecRawStatSyncSum);
+                     RECD_INT, RECP_PERSISTENT, (int) net_handler_run_stat, RecRawStatSyncSum);
   NET_CLEAR_DYN_STAT(net_handler_run_stat);
 
   RecRegisterRawStat(net_rsb, RECT_PROCESS, "proxy.process.net.read_bytes",
-                     RECD_INT, RECP_NULL, (int) net_read_bytes_stat, RecRawStatSyncSum);
+                     RECD_INT, RECP_PERSISTENT, (int) net_read_bytes_stat, RecRawStatSyncSum);
 
   RecRegisterRawStat(net_rsb, RECT_PROCESS, "proxy.process.net.write_bytes",
-                     RECD_INT, RECP_NULL, (int) net_write_bytes_stat, RecRawStatSyncSum);
+                     RECD_INT, RECP_PERSISTENT, (int) net_write_bytes_stat, RecRawStatSyncSum);
 
   RecRegisterRawStat(net_rsb, RECT_PROCESS, "proxy.process.net.connections_currently_open",
                      RECD_INT, RECP_NON_PERSISTENT, (int) net_connections_currently_open_stat,
RecRawStatSyncSum);
@@ -67,49 +67,49 @@ register_net_stats()
   NET_CLEAR_DYN_STAT(net_accepts_currently_open_stat);
 
   RecRegisterRawStat(net_rsb, RECT_PROCESS, "proxy.process.net.calls_to_readfromnet",
-                     RECD_INT, RECP_NULL, (int) net_calls_to_readfromnet_stat, RecRawStatSyncSum);
+                     RECD_INT, RECP_PERSISTENT, (int) net_calls_to_readfromnet_stat, RecRawStatSyncSum);
   NET_CLEAR_DYN_STAT(net_calls_to_readfromnet_stat);
 
   RecRegisterRawStat(net_rsb, RECT_PROCESS, "proxy.process.net.calls_to_readfromnet_afterpoll",
-                     RECD_INT, RECP_NULL, (int) net_calls_to_readfromnet_afterpoll_stat,
RecRawStatSyncSum);
+                     RECD_INT, RECP_PERSISTENT, (int) net_calls_to_readfromnet_afterpoll_stat,
RecRawStatSyncSum);
   NET_CLEAR_DYN_STAT(net_calls_to_readfromnet_afterpoll_stat);
 
   RecRegisterRawStat(net_rsb, RECT_PROCESS, "proxy.process.net.calls_to_read",
-                     RECD_INT, RECP_NULL, (int) net_calls_to_read_stat, RecRawStatSyncSum);
+                     RECD_INT, RECP_PERSISTENT, (int) net_calls_to_read_stat, RecRawStatSyncSum);
   NET_CLEAR_DYN_STAT(net_calls_to_read_stat);
 
   RecRegisterRawStat(net_rsb, RECT_PROCESS, "proxy.process.net.calls_to_read_nodata",
-                     RECD_INT, RECP_NULL, (int) net_calls_to_read_nodata_stat, RecRawStatSyncSum);
+                     RECD_INT, RECP_PERSISTENT, (int) net_calls_to_read_nodata_stat, RecRawStatSyncSum);
   NET_CLEAR_DYN_STAT(net_calls_to_read_nodata_stat);
 
   RecRegisterRawStat(net_rsb, RECT_PROCESS, "proxy.process.net.calls_to_writetonet",
-                     RECD_INT, RECP_NULL, (int) net_calls_to_writetonet_stat, RecRawStatSyncSum);
+                     RECD_INT, RECP_PERSISTENT, (int) net_calls_to_writetonet_stat, RecRawStatSyncSum);
   NET_CLEAR_DYN_STAT(net_calls_to_writetonet_stat);
 
   RecRegisterRawStat(net_rsb, RECT_PROCESS, "proxy.process.net.calls_to_writetonet_afterpoll",
-                     RECD_INT, RECP_NULL, (int) net_calls_to_writetonet_afterpoll_stat, RecRawStatSyncSum);
+                     RECD_INT, RECP_PERSISTENT, (int) net_calls_to_writetonet_afterpoll_stat,
RecRawStatSyncSum);
   NET_CLEAR_DYN_STAT(net_calls_to_writetonet_afterpoll_stat);
 
   RecRegisterRawStat(net_rsb, RECT_PROCESS, "proxy.process.net.calls_to_write",
-                     RECD_INT, RECP_NULL, (int) net_calls_to_write_stat, RecRawStatSyncSum);
+                     RECD_INT, RECP_PERSISTENT, (int) net_calls_to_write_stat, RecRawStatSyncSum);
   NET_CLEAR_DYN_STAT(net_calls_to_write_stat);
 
   RecRegisterRawStat(net_rsb, RECT_PROCESS, "proxy.process.net.calls_to_write_nodata",
-                     RECD_INT, RECP_NULL, (int) net_calls_to_write_nodata_stat, RecRawStatSyncSum);
+                     RECD_INT, RECP_PERSISTENT, (int) net_calls_to_write_nodata_stat, RecRawStatSyncSum);
   NET_CLEAR_DYN_STAT(net_calls_to_write_nodata_stat);
 
   RecRegisterRawStat(net_rsb, RECT_PROCESS, "proxy.process.socks.connections_successful",
-                     RECD_INT, RECP_NULL, (int) socks_connections_successful_stat, RecRawStatSyncSum);
+                     RECD_INT, RECP_PERSISTENT, (int) socks_connections_successful_stat,
RecRawStatSyncSum);
 
   RecRegisterRawStat(net_rsb, RECT_PROCESS, "proxy.process.socks.connections_unsuccessful",
-                     RECD_INT, RECP_NULL, (int) socks_connections_unsuccessful_stat, RecRawStatSyncSum);
+                     RECD_INT, RECP_PERSISTENT, (int) socks_connections_unsuccessful_stat,
RecRawStatSyncSum);
 
   RecRegisterRawStat(net_rsb, RECT_PROCESS, "proxy.process.socks.connections_currently_open",
                      RECD_INT, RECP_NON_PERSISTENT, (int) socks_connections_currently_open_stat,
RecRawStatSyncSum);
   NET_CLEAR_DYN_STAT(socks_connections_currently_open_stat);
 
   RecRegisterRawStat(net_rsb, RECT_PROCESS, "proxy.process.net.inactivity_cop_lock_acquire_failure",
-                     RECD_INT, RECP_NULL, (int) inactivity_cop_lock_acquire_failure_stat,
+                     RECD_INT, RECP_PERSISTENT, (int) inactivity_cop_lock_acquire_failure_stat,
                      RecRawStatSyncSum);
 }
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7352493c/lib/records/test_RecProcess.i
----------------------------------------------------------------------
diff --git a/lib/records/test_RecProcess.i b/lib/records/test_RecProcess.i
index 82084cf..4f15703 100644
--- a/lib/records/test_RecProcess.i
+++ b/lib/records/test_RecProcess.i
@@ -510,25 +510,25 @@ Test03()
   g_rsb = RecAllocateRawStatBlock((int) MY_STAT_COUNT);
 
   RecRegisterRawStat(g_rsb, RECT_PROCESS, "proxy.process.test_raw_stat_a",
-                     RECD_FLOAT, RECP_NULL, (int) MY_STAT_A, RecRawStatSyncAvg);
+                     RECD_FLOAT, RECP_NON_PERSISTENT, (int) MY_STAT_A, RecRawStatSyncAvg);
 
   RecRegisterRawStat(g_rsb, RECT_PROCESS, "proxy.process.test_raw_stat_b",
                      RECD_INT, RECP_PERSISTENT, (int) MY_STAT_B, RecRawStatSyncSum);
 
   RecRegisterRawStat(g_rsb, RECT_PROCESS, "proxy.process.test_raw_stat_c",
-                     RECD_INT, RECP_NULL, (int) MY_STAT_C, RecRawStatSyncCount);
+                     RECD_INT, RECP_NON_PERSISTENT, (int) MY_STAT_C, RecRawStatSyncCount);
 
   RecRegisterRawStat(g_rsb, RECT_PROCESS, "proxy.process.test_raw_stat_d",
-                     RECD_FLOAT, RECP_NULL, (int) MY_STAT_D, raw_stat_sync_ticks_per_sec);
+                     RECD_FLOAT, RECP_NON_PERSISTENT, (int) MY_STAT_D, raw_stat_sync_ticks_per_sec);
 
   RecRegisterRawStat(g_rsb, RECT_PROCESS, "proxy.process.test_raw_stat_e",
-                     RECD_FLOAT, RECP_NULL, (int) MY_STAT_E, RecRawStatSyncHrTimeAvg);
+                     RECD_FLOAT, RECP_NON_PERSISTENT, (int) MY_STAT_E, RecRawStatSyncHrTimeAvg);
   RecRegisterRawStat(g_rsb, RECT_PROCESS, "proxy.process.test_raw_stat_f",
-                     RECD_INT, RECP_NULL, (int) MY_STAT_F, RecRawStatSyncCount);
+                     RECD_INT, RECP_NON_PERSISTENT, (int) MY_STAT_F, RecRawStatSyncCount);
   // If forget to Register this RawStat, we will have SEGV when checking 
   // g_rsb->global[MY_STAT_G]
   RecRegisterRawStat(g_rsb, RECT_PROCESS, "proxy.process.test_raw_stat_g",
-                     RECD_INT, RECP_NULL, (int) MY_STAT_G, RecRawStatSyncSum);
+                     RECD_INT, RECP_NON_PERSISTENT, (int) MY_STAT_G, RecRawStatSyncSum);
 
   // Schedule a bunch of continuations that will use the stats registered above
   RawStatCont *sc = new RawStatCont(new_ProxyMutex());

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7352493c/lib/records/test_RecordsConfig.cc
----------------------------------------------------------------------
diff --git a/lib/records/test_RecordsConfig.cc b/lib/records/test_RecordsConfig.cc
index 0c395eb..e62e4a8 100644
--- a/lib/records/test_RecordsConfig.cc
+++ b/lib/records/test_RecordsConfig.cc
@@ -51,10 +51,10 @@ RecordsConfigRegister()
   RecRegisterConfigCounter(RECT_CONFIG, "proxy.config.link_test_3", 0, RECU_DYNAMIC, RECC_NULL,
NULL);
 
   // NODE
-  RecRegisterStatString(RECT_NODE, "proxy.node.cb_test_1", "cb_test_1__original", RECP_NULL);
-  RecRegisterStatString(RECT_NODE, "proxy.node.cb_test_2", "cb_test_2__original", RECP_NULL);
-  RecRegisterStatInt(RECT_NODE, "proxy.node.cb_test_int", 0, RECP_NULL);
-  RecRegisterStatFloat(RECT_NODE, "proxy.node.cb_test_float", 0.0f, RECP_NULL);
-  RecRegisterStatCounter(RECT_NODE, "proxy.node.cb_test_count", 0, RECP_NULL);
+  RecRegisterStatString(RECT_NODE, "proxy.node.cb_test_1", "cb_test_1__original", RECP_NON_PERSISTENT);
+  RecRegisterStatString(RECT_NODE, "proxy.node.cb_test_2", "cb_test_2__original", RECP_NON_PERSISTENT);
+  RecRegisterStatInt(RECT_NODE, "proxy.node.cb_test_int", 0, RECP_NON_PERSISTENT);
+  RecRegisterStatFloat(RECT_NODE, "proxy.node.cb_test_float", 0.0f, RECP_NON_PERSISTENT);
+  RecRegisterStatCounter(RECT_NODE, "proxy.node.cb_test_count", 0, RECP_NON_PERSISTENT);
 
 }

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7352493c/mgmt/BaseManager.h
----------------------------------------------------------------------
diff --git a/mgmt/BaseManager.h b/mgmt/BaseManager.h
index a651e28..0fa7a3c 100644
--- a/mgmt/BaseManager.h
+++ b/mgmt/BaseManager.h
@@ -92,7 +92,7 @@
 #define MGMT_SIGNAL_LOGGING_WARNING       10
 // Currently unused: 11
 // Currently unused: 12
-#define MGMT_SIGNAL_PLUGIN_ADD_REC        13
+// Currently unused: 13
 #define MGMT_SIGNAL_PLUGIN_SET_CONFIG     14
 #define MGMT_SIGNAL_LOG_FILES_ROLLED      15
 #define MGMT_SIGNAL_LIBRECORDS            16

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7352493c/mgmt/LocalManager.cc
----------------------------------------------------------------------
diff --git a/mgmt/LocalManager.cc b/mgmt/LocalManager.cc
index 2bc67ad..ce4b85a 100644
--- a/mgmt/LocalManager.cc
+++ b/mgmt/LocalManager.cc
@@ -617,35 +617,6 @@ LocalManager::handleMgmtMsgFromProcesses(MgmtMessageHdr * mh)
   case MGMT_SIGNAL_CONFIG_FILE_READ:
     mgmt_log(stderr, "[LocalManager::handleMgmtMsgFromProcesses] File done '%d'\n", data_raw);
     break;
-  case MGMT_SIGNAL_PLUGIN_ADD_REC:
-    {
-      char var_name[256];
-      char var_value[256];
-      RecDataT data_type;
-      // data_type is an enum type, so cast to an int* to avoid warnings. /leif
-      // coverity[secure_coding]
-      if (sscanf(data_raw, "%255s %d %255s", var_name, (int *) &data_type, var_value)
!= 3) {
-        Debug("lm", "Warning: Bad data_type: %s", (char *) data_raw);
-        data_type = RECD_MAX;
-      }
-      switch (data_type) {
-      case RECD_COUNTER:
-        RecRegisterStatCounter(RECT_PLUGIN, var_name, ink_atoi64(var_value), RECP_NULL);
-        break;
-      case RECD_INT:
-        RecRegisterStatInt(RECT_PLUGIN, var_name, ink_atoi64(var_value), RECP_NULL);
-        break;
-      case RECD_FLOAT:
-        RecRegisterStatFloat(RECT_PLUGIN, var_name, atof(var_value), RECP_NULL);
-        break;
-      case RECD_STRING:
-        RecRegisterStatString(RECT_PLUGIN, var_name, var_value, RECP_NULL);
-        break;
-      default:
-        break;
-      }
-      break;
-    }
   case MGMT_SIGNAL_PLUGIN_SET_CONFIG:
     {
       char var_name[256];

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7352493c/proxy/ICPStats.cc
----------------------------------------------------------------------
diff --git a/proxy/ICPStats.cc b/proxy/ICPStats.cc
index b9da078..9cb370b 100644
--- a/proxy/ICPStats.cc
+++ b/proxy/ICPStats.cc
@@ -44,81 +44,81 @@ ICPProcessor::InitICPStatCallbacks()
 
   RecRegisterRawStat(icp_rsb, RECT_PROCESS,
                      "proxy.process.icp.config_mgmt_callouts",
-                     RECD_INT, RECP_NULL, (int) config_mgmt_callouts_stat, RecRawStatSyncCount);
+                     RECD_INT, RECP_PERSISTENT, (int) config_mgmt_callouts_stat, RecRawStatSyncCount);
   RecRegisterRawStat(icp_rsb, RECT_PROCESS,
                      "proxy.process.icp.reconfig_polls",
-                     RECD_INT, RECP_NULL, (int) reconfig_polls_stat, RecRawStatSyncCount);
+                     RECD_INT, RECP_PERSISTENT, (int) reconfig_polls_stat, RecRawStatSyncCount);
   RecRegisterRawStat(icp_rsb, RECT_PROCESS,
                      "proxy.process.icp.reconfig_events",
-                     RECD_INT, RECP_NULL, (int) reconfig_events_stat, RecRawStatSyncCount);
+                     RECD_INT, RECP_PERSISTENT, (int) reconfig_events_stat, RecRawStatSyncCount);
   RecRegisterRawStat(icp_rsb, RECT_PROCESS,
                      "proxy.process.icp.invalid_poll_data",
-                     RECD_INT, RECP_NULL, (int) invalid_poll_data_stat, RecRawStatSyncCount);
+                     RECD_INT, RECP_PERSISTENT, (int) invalid_poll_data_stat, RecRawStatSyncCount);
   RecRegisterRawStat(icp_rsb, RECT_PROCESS,
                      "proxy.process.icp.no_data_read",
-                     RECD_INT, RECP_NULL, (int) no_data_read_stat, RecRawStatSyncCount);
+                     RECD_INT, RECP_PERSISTENT, (int) no_data_read_stat, RecRawStatSyncCount);
   RecRegisterRawStat(icp_rsb, RECT_PROCESS,
-                     "proxy.process.icp.short_read", RECD_INT, RECP_NULL, (int) short_read_stat,
RecRawStatSyncCount);
+                     "proxy.process.icp.short_read", RECD_INT, RECP_PERSISTENT, (int) short_read_stat,
RecRawStatSyncCount);
   RecRegisterRawStat(icp_rsb, RECT_PROCESS,
                      "proxy.process.icp.invalid_sender",
-                     RECD_INT, RECP_NULL, (int) invalid_sender_stat, RecRawStatSyncCount);
+                     RECD_INT, RECP_PERSISTENT, (int) invalid_sender_stat, RecRawStatSyncCount);
   RecRegisterRawStat(icp_rsb, RECT_PROCESS,
                      "proxy.process.icp.read_not_v2_icp",
-                     RECD_INT, RECP_NULL, (int) read_not_v2_icp_stat, RecRawStatSyncCount);
+                     RECD_INT, RECP_PERSISTENT, (int) read_not_v2_icp_stat, RecRawStatSyncCount);
   RecRegisterRawStat(icp_rsb, RECT_PROCESS,
                      "proxy.process.icp.icp_remote_query_requests",
-                     RECD_INT, RECP_NULL, (int) icp_remote_query_requests_stat, RecRawStatSyncCount);
+                     RECD_INT, RECP_PERSISTENT, (int) icp_remote_query_requests_stat, RecRawStatSyncCount);
   RecRegisterRawStat(icp_rsb, RECT_PROCESS,
                      "proxy.process.icp.icp_remote_responses",
-                     RECD_INT, RECP_NULL, (int) icp_remote_responses_stat, RecRawStatSyncCount);
+                     RECD_INT, RECP_PERSISTENT, (int) icp_remote_responses_stat, RecRawStatSyncCount);
   RecRegisterRawStat(icp_rsb, RECT_PROCESS,
                      "proxy.process.icp.cache_lookup_success",
-                     RECD_INT, RECP_NULL, (int) icp_cache_lookup_success_stat, RecRawStatSyncCount);
+                     RECD_INT, RECP_PERSISTENT, (int) icp_cache_lookup_success_stat, RecRawStatSyncCount);
   RecRegisterRawStat(icp_rsb, RECT_PROCESS,
                      "proxy.process.icp.cache_lookup_fail",
-                     RECD_INT, RECP_NULL, (int) icp_cache_lookup_fail_stat, RecRawStatSyncCount);
+                     RECD_INT, RECP_PERSISTENT, (int) icp_cache_lookup_fail_stat, RecRawStatSyncCount);
   RecRegisterRawStat(icp_rsb, RECT_PROCESS,
                      "proxy.process.icp.query_response_write",
-                     RECD_INT, RECP_NULL, (int) query_response_write_stat, RecRawStatSyncCount);
+                     RECD_INT, RECP_PERSISTENT, (int) query_response_write_stat, RecRawStatSyncCount);
   RecRegisterRawStat(icp_rsb, RECT_PROCESS,
                      "proxy.process.icp.query_response_partial_write",
-                     RECD_INT, RECP_NULL, (int) query_response_partial_write_stat, RecRawStatSyncCount);
+                     RECD_INT, RECP_PERSISTENT, (int) query_response_partial_write_stat,
RecRawStatSyncCount);
   RecRegisterRawStat(icp_rsb, RECT_PROCESS,
                      "proxy.process.icp.no_icp_request_for_response",
-                     RECD_INT, RECP_NULL, (int) no_icp_request_for_response_stat, RecRawStatSyncCount);
+                     RECD_INT, RECP_PERSISTENT, (int) no_icp_request_for_response_stat, RecRawStatSyncCount);
   RecRegisterRawStat(icp_rsb, RECT_PROCESS,
                      "proxy.process.icp.icp_response_request_nolock",
-                     RECD_INT, RECP_NULL, (int) icp_response_request_nolock_stat, RecRawStatSyncCount);
+                     RECD_INT, RECP_PERSISTENT, (int) icp_response_request_nolock_stat, RecRawStatSyncCount);
   RecRegisterRawStat(icp_rsb, RECT_PROCESS,
                      "proxy.process.icp.icp_start_icpoff",
-                     RECD_INT, RECP_NULL, (int) icp_start_icpoff_stat, RecRawStatSyncCount);
+                     RECD_INT, RECP_PERSISTENT, (int) icp_start_icpoff_stat, RecRawStatSyncCount);
   RecRegisterRawStat(icp_rsb, RECT_PROCESS,
                      "proxy.process.icp.send_query_partial_write",
-                     RECD_INT, RECP_NULL, (int) send_query_partial_write_stat, RecRawStatSyncCount);
+                     RECD_INT, RECP_PERSISTENT, (int) send_query_partial_write_stat, RecRawStatSyncCount);
   RecRegisterRawStat(icp_rsb, RECT_PROCESS,
                      "proxy.process.icp.icp_queries_no_expected_replies",
-                     RECD_INT, RECP_NULL, (int) icp_queries_no_expected_replies_stat, RecRawStatSyncCount);
+                     RECD_INT, RECP_PERSISTENT, (int) icp_queries_no_expected_replies_stat,
RecRawStatSyncCount);
   RecRegisterRawStat(icp_rsb, RECT_PROCESS,
                      "proxy.process.icp.icp_query_hits",
-                     RECD_INT, RECP_NULL, (int) icp_query_hits_stat, RecRawStatSyncCount);
+                     RECD_INT, RECP_PERSISTENT, (int) icp_query_hits_stat, RecRawStatSyncCount);
   RecRegisterRawStat(icp_rsb, RECT_PROCESS,
                      "proxy.process.icp.icp_query_misses",
-                     RECD_INT, RECP_NULL, (int) icp_query_misses_stat, RecRawStatSyncCount);
+                     RECD_INT, RECP_PERSISTENT, (int) icp_query_misses_stat, RecRawStatSyncCount);
   RecRegisterRawStat(icp_rsb, RECT_PROCESS,
                      "proxy.process.icp.invalid_icp_query_response",
-                     RECD_INT, RECP_NULL, (int) invalid_icp_query_response_stat, RecRawStatSyncCount);
+                     RECD_INT, RECP_PERSISTENT, (int) invalid_icp_query_response_stat, RecRawStatSyncCount);
   RecRegisterRawStat(icp_rsb, RECT_PROCESS,
                      "proxy.process.icp.icp_query_requests",
-                     RECD_INT, RECP_NULL, (int) icp_query_requests_stat, RecRawStatSyncCount);
+                     RECD_INT, RECP_PERSISTENT, (int) icp_query_requests_stat, RecRawStatSyncCount);
   RecRegisterRawStat(icp_rsb, RECT_PROCESS,
                      "proxy.process.icp.total_icp_response_time",
-                     RECD_FLOAT, RECP_NULL, (int) total_icp_response_time_stat, RecRawStatSyncMHrTimeAvg);
+                     RECD_FLOAT, RECP_PERSISTENT, (int) total_icp_response_time_stat, RecRawStatSyncMHrTimeAvg);
   RecRegisterRawStat(icp_rsb, RECT_PROCESS,
                      "proxy.process.icp.total_udp_send_queries",
-                     RECD_INT, RECP_NULL, (int) total_udp_send_queries_stat, RecRawStatSyncSum);
+                     RECD_INT, RECP_PERSISTENT, (int) total_udp_send_queries_stat, RecRawStatSyncSum);
   RecRegisterRawStat(icp_rsb, RECT_PROCESS,
                      "proxy.process.icp.total_icp_request_time",
-                     RECD_FLOAT, RECP_NULL, (int) total_icp_request_time_stat, RecRawStatSyncMHrTimeAvg);
+                     RECD_FLOAT, RECP_PERSISTENT, (int) total_icp_request_time_stat, RecRawStatSyncMHrTimeAvg);
 
 }
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7352493c/proxy/InkAPI.cc
----------------------------------------------------------------------
diff --git a/proxy/InkAPI.cc b/proxy/InkAPI.cc
index 53a8b65..a0f752f 100644
--- a/proxy/InkAPI.cc
+++ b/proxy/InkAPI.cc
@@ -6663,7 +6663,17 @@ TSStatCreate(const char *the_name, TSRecordDataType the_type, TSStatPersistence
     syncer = RecRawStatSyncCount;
     break;
   }
-  RecRegisterRawStat(api_rsb, RECT_PLUGIN, the_name, (RecDataT)the_type, (RecPersistT)persist,
id, syncer);
+
+  switch (persist) {
+  case TS_STAT_PERSISTENT:
+    RecRegisterRawStat(api_rsb, RECT_PLUGIN, the_name, (RecDataT)the_type, RECP_PERSISTENT,
id, syncer);
+    break;
+  case TS_STAT_NON_PERSISTENT:
+    RecRegisterRawStat(api_rsb, RECT_PLUGIN, the_name, (RecDataT)the_type, RECP_NON_PERSISTENT,
id, syncer);
+    break;
+  default:
+    return TS_ERROR;
+  }
 
   return id;
 }

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7352493c/proxy/Main.cc
----------------------------------------------------------------------
diff --git a/proxy/Main.cc b/proxy/Main.cc
index a48e48a..f224e9b 100644
--- a/proxy/Main.cc
+++ b/proxy/Main.cc
@@ -326,13 +326,13 @@ initialize_process_manager()
   //
   // Define version info records
   //
-  RecRegisterStatString(RECT_PROCESS, "proxy.process.version.server.short", appVersionInfo.VersionStr,
RECP_NULL);
-  RecRegisterStatString(RECT_PROCESS, "proxy.process.version.server.long", appVersionInfo.FullVersionInfoStr,
RECP_NULL);
-  RecRegisterStatString(RECT_PROCESS, "proxy.process.version.server.build_number", appVersionInfo.BldNumStr,
RECP_NULL);
-  RecRegisterStatString(RECT_PROCESS, "proxy.process.version.server.build_time", appVersionInfo.BldTimeStr,
RECP_NULL);
-  RecRegisterStatString(RECT_PROCESS, "proxy.process.version.server.build_date", appVersionInfo.BldDateStr,
RECP_NULL);
-  RecRegisterStatString(RECT_PROCESS, "proxy.process.version.server.build_machine", appVersionInfo.BldMachineStr,
RECP_NULL);
-  RecRegisterStatString(RECT_PROCESS, "proxy.process.version.server.build_person", appVersionInfo.BldPersonStr,
RECP_NULL);
+  RecRegisterStatString(RECT_PROCESS, "proxy.process.version.server.short", appVersionInfo.VersionStr,
RECP_NON_PERSISTENT);
+  RecRegisterStatString(RECT_PROCESS, "proxy.process.version.server.long", appVersionInfo.FullVersionInfoStr,
RECP_NON_PERSISTENT);
+  RecRegisterStatString(RECT_PROCESS, "proxy.process.version.server.build_number", appVersionInfo.BldNumStr,
RECP_NON_PERSISTENT);
+  RecRegisterStatString(RECT_PROCESS, "proxy.process.version.server.build_time", appVersionInfo.BldTimeStr,
RECP_NON_PERSISTENT);
+  RecRegisterStatString(RECT_PROCESS, "proxy.process.version.server.build_date", appVersionInfo.BldDateStr,
RECP_NON_PERSISTENT);
+  RecRegisterStatString(RECT_PROCESS, "proxy.process.version.server.build_machine", appVersionInfo.BldMachineStr,
RECP_NON_PERSISTENT);
+  RecRegisterStatString(RECT_PROCESS, "proxy.process.version.server.build_person", appVersionInfo.BldPersonStr,
RECP_NON_PERSISTENT);
 }
 
 //

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7352493c/proxy/SocksProxy.cc
----------------------------------------------------------------------
diff --git a/proxy/SocksProxy.cc b/proxy/SocksProxy.cc
index 10b2b10..e447f12 100644
--- a/proxy/SocksProxy.cc
+++ b/proxy/SocksProxy.cc
@@ -535,11 +535,11 @@ start_SocksProxy(int port)
   if (socksproxy_stat_block) {
     RecRegisterRawStat(socksproxy_stat_block, RECT_PROCESS,
                        "proxy.process.socks.proxy.http_connections",
-                       RECD_INT, RECP_NULL, socksproxy_http_connections_stat, RecRawStatSyncCount);
+                       RECD_INT, RECP_PERSISTENT, socksproxy_http_connections_stat, RecRawStatSyncCount);
 
     RecRegisterRawStat(socksproxy_stat_block, RECT_PROCESS,
                        "proxy.process.socks.proxy.tunneled_connections",
-                       RECD_INT, RECP_NULL, socksproxy_tunneled_connections_stat, RecRawStatSyncCount);
+                       RECD_INT, RECP_PERSISTENT, socksproxy_tunneled_connections_stat, RecRawStatSyncCount);
   }
 }
 


Mime
View raw message