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 2019/11/06 00:42:57 UTC
[trafficserver] 01/02: Remove never implemented
HttpTransact::service_transaction_in_proxy_only_mode
This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit 003e7123c424b3d64a2f01d70a5c4e6b0b43340f
Author: Randall Meyer <rr...@apache.org>
AuthorDate: Fri Nov 1 16:24:21 2019 -0700
Remove never implemented HttpTransact::service_transaction_in_proxy_only_mode
HttpTransact::service_transaction_in_proxy_only_mode was part of the
original import with a TODO to implement. This was never done.
Also remove proxy.process.http.throttled_proxy_only as it was only
incremented in a code path never executed.
(cherry picked from commit 51961cb54d448c94127028171c297ba3a40793db)
---
.../monitoring/statistics/core/bandwidth.en.rst | 1 -
proxy/http/HttpConfig.cc | 3 ---
proxy/http/HttpConfig.h | 1 -
proxy/http/HttpTransact.cc | 27 ----------------------
proxy/http/HttpTransact.h | 1 -
5 files changed, 33 deletions(-)
diff --git a/doc/admin-guide/monitoring/statistics/core/bandwidth.en.rst b/doc/admin-guide/monitoring/statistics/core/bandwidth.en.rst
index 0b5113b..73f9966 100644
--- a/doc/admin-guide/monitoring/statistics/core/bandwidth.en.rst
+++ b/doc/admin-guide/monitoring/statistics/core/bandwidth.en.rst
@@ -22,7 +22,6 @@
Bandwidth and Transfer
**********************
-.. ts:stat:: global proxy.process.http.throttled_proxy_only integer
.. ts:stat:: global proxy.process.http.user_agent_request_document_total_size integer
:type: counter
:units: bytes
diff --git a/proxy/http/HttpConfig.cc b/proxy/http/HttpConfig.cc
index 46f0f09..0d247f5 100644
--- a/proxy/http/HttpConfig.cc
+++ b/proxy/http/HttpConfig.cc
@@ -356,9 +356,6 @@ register_stat_callbacks()
RecRegisterRawStat(http_rsb, RECT_PROCESS, "proxy.process.http.tunnels", RECD_COUNTER, RECP_PERSISTENT, (int)http_tunnels_stat,
RecRawStatSyncCount);
- RecRegisterRawStat(http_rsb, RECT_PROCESS, "proxy.process.http.throttled_proxy_only", RECD_COUNTER, RECP_PERSISTENT,
- (int)http_throttled_proxy_only_stat, RecRawStatSyncCount);
-
RecRegisterRawStat(http_rsb, RECT_PROCESS, "proxy.process.http.parent_proxy_transaction_time", RECD_INT, RECP_PERSISTENT,
(int)http_parent_proxy_transaction_time_stat, RecRawStatSyncSum);
diff --git a/proxy/http/HttpConfig.h b/proxy/http/HttpConfig.h
index 45f922d..c030fa5 100644
--- a/proxy/http/HttpConfig.h
+++ b/proxy/http/HttpConfig.h
@@ -121,7 +121,6 @@ enum {
http_cache_deletes_stat,
http_tunnels_stat,
- http_throttled_proxy_only_stat,
// document size stats
http_user_agent_request_header_total_size_stat,
diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc
index f5898f0..0664a45 100644
--- a/proxy/http/HttpTransact.cc
+++ b/proxy/http/HttpTransact.cc
@@ -1817,11 +1817,6 @@ HttpTransact::DecideCacheLookup(State *s)
}
}
- if (service_transaction_in_proxy_only_mode(s)) {
- s->cache_info.action = CACHE_DO_NO_ACTION;
- s->current.mode = TUNNELLING_PROXY;
- HTTP_INCREMENT_DYN_STAT(http_throttled_proxy_only_stat);
- }
// at this point the request is ready to continue down the
// traffic server path.
@@ -6325,28 +6320,6 @@ HttpTransact::is_response_valid(State *s, HTTPHdr *incoming_response)
}
}
-///////////////////////////////////////////////////////////////////////////////
-// Name : service_transaction_in_proxy_only_mode
-// Description: uses some metric to force this transaction to be proxy-only
-//
-// Details :
-//
-// Some metric may be employed to force the traffic server to enter
-// a proxy-only mode temporarily. This function is called to determine
-// if the current transaction should be proxy-only. The function is
-// called from initialize_state_variables_from_request and is used to
-// set s->current.mode to TUNNELLING_PROXY and just for safety to set
-// s->cache_info.action to CACHE_DO_NO_ACTION.
-//
-// Currently the function is just a placeholder and always returns false.
-//
-///////////////////////////////////////////////////////////////////////////////
-bool
-HttpTransact::service_transaction_in_proxy_only_mode(State * /* s ATS_UNUSED */)
-{
- return false;
-}
-
void
HttpTransact::process_quick_http_filter(State *s, int method)
{
diff --git a/proxy/http/HttpTransact.h b/proxy/http/HttpTransact.h
index f7bfef5..59948c7 100644
--- a/proxy/http/HttpTransact.h
+++ b/proxy/http/HttpTransact.h
@@ -997,7 +997,6 @@ public:
static bool get_ka_info_from_config(State *s, ConnectionAttributes *server_info);
static void get_ka_info_from_host_db(State *s, ConnectionAttributes *server_info, ConnectionAttributes *client_info,
HostDBInfo *host_db_info);
- static bool service_transaction_in_proxy_only_mode(State *s);
static void setup_plugin_request_intercept(State *s);
static void add_client_ip_to_outgoing_request(State *s, HTTPHdr *request);
static RequestError_t check_request_validity(State *s, HTTPHdr *incoming_hdr);