This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch 9.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/9.1.x by this push:
new 4ce0e1a Remove proxy.config.http.down_server.abort_threshold (#7748)
4ce0e1a is described below
commit 4ce0e1a42066b0119a96bd0e65a8e4299ba99f34
Author: Susan Hinrichs <[email protected]>
AuthorDate: Mon May 3 16:04:20 2021 -0500
Remove proxy.config.http.down_server.abort_threshold (#7748)
(cherry picked from commit 0bc810f0c2991e97a8ea4ff94deb6f248be694fd)
---
doc/admin-guide/files/records.config.en.rst | 7 -----
.../api/functions/TSHttpOverridableConfig.en.rst | 1 -
doc/release-notes/upgrading.en.rst | 2 ++
include/ts/apidefs.h.in | 1 +
mgmt/RecordsConfig.cc | 2 --
proxy/http/HttpConfig.cc | 4 +--
proxy/http/HttpConfig.h | 2 +-
proxy/http/HttpSM.cc | 33 ----------------------
proxy/http/HttpSM.h | 1 -
src/shared/overridable_txn_vars.cc | 1 +
10 files changed, 6 insertions(+), 48 deletions(-)
diff --git a/doc/admin-guide/files/records.config.en.rst
b/doc/admin-guide/files/records.config.en.rst
index 66fb94b..400f8c2 100644
--- a/doc/admin-guide/files/records.config.en.rst
+++ b/doc/admin-guide/files/records.config.en.rst
@@ -1617,13 +1617,6 @@ Origin Server Connect Attempts
Specifies how long (in seconds) |TS| remembers that an origin server was
unreachable.
-.. ts:cv:: CONFIG proxy.config.http.down_server.abort_threshold INT 10
- :reloadable:
- :overridable:
-
- The number of seconds before |TS| marks an origin server as unavailable
after a client abandons a request
- because the origin server was too slow in sending the response header.
-
.. ts:cv:: CONFIG proxy.config.http.uncacheable_requests_bypass_parent INT 1
:reloadable:
:overridable:
diff --git a/doc/developer-guide/api/functions/TSHttpOverridableConfig.en.rst
b/doc/developer-guide/api/functions/TSHttpOverridableConfig.en.rst
index fae74b5..f14308c 100644
--- a/doc/developer-guide/api/functions/TSHttpOverridableConfig.en.rst
+++ b/doc/developer-guide/api/functions/TSHttpOverridableConfig.en.rst
@@ -116,7 +116,6 @@ TSOverridableConfigKey Value
Configuratio
:c:macro:`TS_CONFIG_HTTP_DEFAULT_BUFFER_SIZE`
:ts:cv:`proxy.config.http.default_buffer_size`
:c:macro:`TS_CONFIG_HTTP_DEFAULT_BUFFER_WATER_MARK`
:ts:cv:`proxy.config.http.default_buffer_water_mark`
:c:macro:`TS_CONFIG_HTTP_DOC_IN_CACHE_SKIP_DNS`
:ts:cv:`proxy.config.http.doc_in_cache_skip_dns`
-:c:macro:`TS_CONFIG_HTTP_DOWN_SERVER_ABORT_THRESHOLD`
:ts:cv:`proxy.config.http.down_server.abort_threshold`
:c:macro:`TS_CONFIG_HTTP_DOWN_SERVER_CACHE_TIME`
:ts:cv:`proxy.config.http.down_server.cache_time`
:c:macro:`TS_CONFIG_HTTP_FLOW_CONTROL_ENABLED`
:ts:cv:`proxy.config.http.flow_control.enabled`
:c:macro:`TS_CONFIG_HTTP_FLOW_CONTROL_HIGH_WATER_MARK`
:ts:cv:`proxy.config.http.flow_control.high_water`
diff --git a/doc/release-notes/upgrading.en.rst
b/doc/release-notes/upgrading.en.rst
index 3a61ff2..5692087 100644
--- a/doc/release-notes/upgrading.en.rst
+++ b/doc/release-notes/upgrading.en.rst
@@ -46,6 +46,8 @@ Configuration changes
---------------------
The following incompatible changes to the configurations have been made in
this version of ATS.
+The records.config entry proxy.config.http.down_server.abort_threshold has
been removed.
+
Plugins
-------
diff --git a/include/ts/apidefs.h.in b/include/ts/apidefs.h.in
index 93098b1..5912600 100644
--- a/include/ts/apidefs.h.in
+++ b/include/ts/apidefs.h.in
@@ -728,6 +728,7 @@ typedef enum {
TS_CONFIG_HTTP_CONNECT_ATTEMPTS_TIMEOUT,
TS_CONFIG_HTTP_POST_CONNECT_ATTEMPTS_TIMEOUT,
TS_CONFIG_HTTP_DOWN_SERVER_CACHE_TIME,
+ // Should be removed for 10.0
TS_CONFIG_HTTP_DOWN_SERVER_ABORT_THRESHOLD,
TS_CONFIG_HTTP_DOC_IN_CACHE_SKIP_DNS,
TS_CONFIG_HTTP_BACKGROUND_FILL_ACTIVE_TIMEOUT,
diff --git a/mgmt/RecordsConfig.cc b/mgmt/RecordsConfig.cc
index 8d9edee..1b50d3b 100644
--- a/mgmt/RecordsConfig.cc
+++ b/mgmt/RecordsConfig.cc
@@ -495,8 +495,6 @@ static const RecordElement RecordsConfig[] =
,
{RECT_CONFIG, "proxy.config.http.down_server.cache_time", RECD_INT, "60",
RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
,
- {RECT_CONFIG, "proxy.config.http.down_server.abort_threshold", RECD_INT,
"10", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
- ,
{RECT_CONFIG, "proxy.config.http.negative_revalidating_enabled", RECD_INT,
"1", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
,
{RECT_CONFIG, "proxy.config.http.negative_revalidating_lifetime", RECD_INT,
"1800", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
diff --git a/proxy/http/HttpConfig.cc b/proxy/http/HttpConfig.cc
index df06f5a..1f226f5 100644
--- a/proxy/http/HttpConfig.cc
+++ b/proxy/http/HttpConfig.cc
@@ -1323,7 +1323,6 @@ HttpConfig::startup()
HttpEstablishStaticConfigByte(c.referer_format_redirect,
"proxy.config.http.referer_format_redirect");
HttpEstablishStaticConfigLongLong(c.oride.down_server_timeout,
"proxy.config.http.down_server.cache_time");
- HttpEstablishStaticConfigLongLong(c.oride.client_abort_threshold,
"proxy.config.http.down_server.abort_threshold");
// Negative caching and revalidation
HttpEstablishStaticConfigByte(c.oride.negative_caching_enabled,
"proxy.config.http.negative_caching_enabled");
@@ -1626,8 +1625,7 @@ HttpConfig::reconfigure()
params->strict_uri_parsing = INT_TO_BOOL(m_master.strict_uri_parsing);
- params->oride.down_server_timeout = m_master.oride.down_server_timeout;
- params->oride.client_abort_threshold = m_master.oride.client_abort_threshold;
+ params->oride.down_server_timeout = m_master.oride.down_server_timeout;
params->oride.negative_caching_enabled =
INT_TO_BOOL(m_master.oride.negative_caching_enabled);
params->oride.negative_caching_lifetime =
m_master.oride.negative_caching_lifetime;
diff --git a/proxy/http/HttpConfig.h b/proxy/http/HttpConfig.h
index 988b543..b9c456d 100644
--- a/proxy/http/HttpConfig.h
+++ b/proxy/http/HttpConfig.h
@@ -662,7 +662,7 @@ struct OverridableHttpConfigParams {
MgmtInt parent_connect_timeout = 30;
MgmtInt down_server_timeout = 300;
- MgmtInt client_abort_threshold = 10;
+ MgmtInt client_abort_threshold = 1000;
// open read failure retries.
MgmtInt max_cache_open_read_retries = -1;
diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc
index 565d265..a5ccc71 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -1023,7 +1023,6 @@ HttpSM::state_watch_for_client_abort(int event, void
*data)
if (ua_entry->read_vio) {
ua_entry->read_vio->nbytes = ua_entry->read_vio->ndone;
}
- mark_server_down_on_client_abort();
milestones[TS_MILESTONE_UA_CLOSE] = Thread::get_hrtime();
set_ua_abort(HttpTransact::ABORTED, event);
@@ -5450,38 +5449,6 @@ HttpSM::set_ua_abort(HttpTransact::AbortState_t
ua_abort, int event)
}
}
-void
-HttpSM::mark_server_down_on_client_abort()
-{
- /////////////////////////////////////////////////////
- // Check see if the client aborted because the //
- // origin server was too slow in sending the //
- // response header. If so, mark that //
- // server as down so other clients won't try to //
- // for revalidation or select it from a round //
- // robin set //
- // //
- // Note: we do not want to mark parent //
- // proxies as down with this metric because //
- // that upstream proxy may be working but //
- // the actual origin server is one that is hung //
- /////////////////////////////////////////////////////
- if (t_state.current.request_to == HttpTransact::ORIGIN_SERVER &&
t_state.hdr_info.request_content_length <= 0) {
- if (milestones[TS_MILESTONE_SERVER_FIRST_CONNECT] != 0 &&
milestones[TS_MILESTONE_SERVER_FIRST_READ] == 0) {
- // Check to see if client waited for the threshold
- // to declare the origin server as down
- ink_hrtime wait = Thread::get_hrtime() -
milestones[TS_MILESTONE_SERVER_FIRST_CONNECT];
- if (wait < 0) {
- wait = 0;
- }
- if (ink_hrtime_to_sec(wait) > t_state.txn_conf->client_abort_threshold) {
- t_state.set_connect_fail(ETIMEDOUT);
- do_hostdb_update_if_necessary();
- }
- }
- }
-}
-
// void HttpSM::release_server_session()
//
// Called when we are not tunneling a response from the
diff --git a/proxy/http/HttpSM.h b/proxy/http/HttpSM.h
index f64a994..50879d5 100644
--- a/proxy/http/HttpSM.h
+++ b/proxy/http/HttpSM.h
@@ -519,7 +519,6 @@ protected:
void handle_http_server_open();
void handle_post_failure();
void mark_host_failure(HostDBInfo *info, time_t time_down);
- void mark_server_down_on_client_abort();
void release_server_session(bool serve_from_cache = false);
void set_ua_abort(HttpTransact::AbortState_t ua_abort, int event);
int write_header_into_buffer(HTTPHdr *h, MIOBuffer *b);
diff --git a/src/shared/overridable_txn_vars.cc
b/src/shared/overridable_txn_vars.cc
index 667416e..42a6b5f 100644
--- a/src/shared/overridable_txn_vars.cc
+++ b/src/shared/overridable_txn_vars.cc
@@ -88,6 +88,7 @@ const std::unordered_map<std::string_view, std::tuple<const
TSOverridableConfigK
{OutboundConnTrack::CONFIG_VAR_MIN,
{TS_CONFIG_HTTP_SERVER_MIN_KEEP_ALIVE_CONNS, TS_RECORDDATATYPE_INT}},
{"proxy.config.http.anonymize_remove_client_ip",
{TS_CONFIG_HTTP_ANONYMIZE_REMOVE_CLIENT_IP, TS_RECORDDATATYPE_INT}},
{"proxy.config.http.cache.open_read_retry_time",
{TS_CONFIG_HTTP_CACHE_OPEN_READ_RETRY_TIME, TS_RECORDDATATYPE_INT}},
+ // Remove for 10. Leaving for now to keep enums consistent
{"proxy.config.http.down_server.abort_threshold",
{TS_CONFIG_HTTP_DOWN_SERVER_ABORT_THRESHOLD, TS_RECORDDATATYPE_INT}},
{OutboundConnTrack::CONFIG_VAR_MATCH,
{TS_CONFIG_HTTP_PER_SERVER_CONNECTION_MATCH, TS_RECORDDATATYPE_INT}},
{"proxy.config.http.parent_proxy.fail_threshold",
{TS_CONFIG_HTTP_PARENT_PROXY_FAIL_THRESHOLD, TS_RECORDDATATYPE_INT}},