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 2020/01/10 19:59:56 UTC
[trafficserver] branch 9.0.x updated (4a0b3c7 -> 0ccf629)
This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a change to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.
from 4a0b3c7 Updated CHANGELOG
new 6c63873 Add links to RWW sections
new 96b37fc Fix rst errors for collapsed forwarding plugin
new 42713b4 Reduce process duration of test_Http2FrequencyCounter
new f2f4558 Doc bugs
new 0ccf629 Clear all pointers in API Hooks clear function.
The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
doc/admin-guide/files/records.config.en.rst | 8 +-
doc/admin-guide/logging/examples.en.rst | 5 +-
.../plugins/collapsed_forwarding.en.rst | 20 ++--
.../monitoring/logging/summary-logs.en.po | 4 +-
proxy/http2/Http2FrequencyCounter.cc | 8 +-
proxy/http2/Http2FrequencyCounter.h | 3 +
.../http2/unit_tests/test_Http2FrequencyCounter.cc | 102 +++++++++++----------
src/traffic_server/InkAPI.cc | 1 +
8 files changed, 81 insertions(+), 70 deletions(-)
[trafficserver] 02/05: Fix rst errors for collapsed forwarding
plugin
Posted by zw...@apache.org.
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 96b37fc0655abe7bfed735916804594f13ebff89
Author: Miles Libbey <ml...@apache.org>
AuthorDate: Sun Dec 29 10:54:22 2019 -0800
Fix rst errors for collapsed forwarding plugin
- The table of configs was printing the rst reference tags
- the link to the thundering herd section wasn't a link
- the hard coded anchor link is better as a reference that stays with
the docs.
(cherry picked from commit 8872c1d48ffd696c98e701e5c9dc71b9c8d180f2)
---
doc/admin-guide/plugins/collapsed_forwarding.en.rst | 20 +++++++++-----------
1 file changed, 9 insertions(+), 11 deletions(-)
diff --git a/doc/admin-guide/plugins/collapsed_forwarding.en.rst b/doc/admin-guide/plugins/collapsed_forwarding.en.rst
index f479da3..eccc678 100644
--- a/doc/admin-guide/plugins/collapsed_forwarding.en.rst
+++ b/doc/admin-guide/plugins/collapsed_forwarding.en.rst
@@ -79,14 +79,14 @@ on the error by using an internal redirect follow back to itself, essentially
blocking the request until a response arrives, at which point, relies on
read-while-writer feature to start downloading the object to all waiting
clients. The following config parameters are assumed to be set for this
-plugin to work::
+plugin to work:
-:ts:cv:`proxy.config.http.cache.open_write_fail_action` 1
-:ts:cv:`proxy.config.cache.enable_read_while_writer` 1
-:ts:cv:`proxy.config.http.number_of_redirections` 10
-:ts:cv:`proxy.config.http.redirect_use_orig_cache_key` 1
-:ts:cv:`proxy.config.http.background_fill_active_timeout` 0
-:ts:cv:`proxy.config.http.background_fill_completed_threshold` 0
+- :ts:cv:`proxy.config.http.cache.open_write_fail_action` ``1``
+- :ts:cv:`proxy.config.cache.enable_read_while_writer` ``1``
+- :ts:cv:`proxy.config.http.number_of_redirections` ``10``
+- :ts:cv:`proxy.config.http.redirect_use_orig_cache_key` ``1``
+- :ts:cv:`proxy.config.http.background_fill_active_timeout` ``0``
+- :ts:cv:`proxy.config.http.background_fill_completed_threshold` ``0``
Additionally, given that collapsed forwarding works based on cache write
lock failure detection, the plugin requires cache to be enabled and ready.
@@ -119,7 +119,7 @@ For a large scale Video Streaming scenario, there’s a combination of a
large number of revalidations (e.g. media playlists) and cache misses
(e.g. media segments) that occur for the same file. Traffic Server’s
RWW works great in collapsing the concurrent requests in such a scenario,
-however, as described in ``_admin-configuration-reducing-origin-requests``,
+however, as described in :ref:`admin-configuration-reducing-origin-requests`,
Traffic Server’s implementation of RWW has a significant limitation, which
restricts its ability to invoke RWW only when the response headers are
already received. This means that any number of concurrent requests for
@@ -185,6 +185,4 @@ retries, allowing to be able to initiate RWW, whenever the response headers
are received for the request that was allowed to go to the Origin.
-More details are available at
-
-https://docs.trafficserver.apache.org/en/6.0.x/admin/http-proxy-caching.en.html#reducing-origin-server-requests-avoiding-the-thundering-herd
+More details are available at :ref:`admin-configuration-reducing-origin-requests`
\ No newline at end of file
[trafficserver] 05/05: Clear all pointers in API Hooks clear
function.
Posted by zw...@apache.org.
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 0ccf62984e5183bd8b183ea2f09292d93874dc72
Author: Walter Karas <wk...@verizonmedia.com>
AuthorDate: Thu Dec 19 10:48:06 2019 -0600
Clear all pointers in API Hooks clear function.
(cherry picked from commit 4bdabd533d44f8959b88ae534018685567c01765)
---
src/traffic_server/InkAPI.cc | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/traffic_server/InkAPI.cc b/src/traffic_server/InkAPI.cc
index 9e8691a..eca9973 100644
--- a/src/traffic_server/InkAPI.cc
+++ b/src/traffic_server/InkAPI.cc
@@ -1454,6 +1454,7 @@ HttpHookState::Scope::operator++()
void
HttpHookState::Scope::clear()
{
+ _hooks = nullptr;
_p = _c = nullptr;
}
[trafficserver] 01/05: Add links to RWW sections
Posted by zw...@apache.org.
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 6c63873adc01872c42ac125a9e155f49b35d0c4b
Author: Miles Libbey <ml...@apache.org>
AuthorDate: Sun Dec 29 11:59:44 2019 -0800
Add links to RWW sections
(cherry picked from commit 64bc0169bb02fa31978e077e7424127c5850e0fa)
---
doc/admin-guide/files/records.config.en.rst | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/doc/admin-guide/files/records.config.en.rst b/doc/admin-guide/files/records.config.en.rst
index 2084d35..0e8743a 100644
--- a/doc/admin-guide/files/records.config.en.rst
+++ b/doc/admin-guide/files/records.config.en.rst
@@ -2329,11 +2329,11 @@ Dynamic Content & Content Negotiation
origin server.
``4`` Return a ``502`` error on either a cache miss or on a revalidation.
``5`` Retry Cache Read on a Cache Write Lock failure. This option together
- with `proxy.config.cache.enable_read_while_writer` configuration
+ with :ts:cv:`proxy.config.cache.enable_read_while_writer` configuration
allows to collapse concurrent requests without a need for any plugin.
- Make sure to configure Read While Writer feature correctly following
- the docs in Cache Basics section. Note that this option may result in
- CACHE_LOOKUP_COMPLETE HOOK being called back more than once.
+ Make sure to configure the :ref:`admin-config-read-while-writer` feature
+ correctly. Note that this option may result in CACHE_LOOKUP_COMPLETE HOOK
+ being called back more than once.
===== ======================================================================
Customizable User Response Pages
[trafficserver] 03/05: Reduce process duration of
test_Http2FrequencyCounter
Posted by zw...@apache.org.
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 42713b4584cf22194f743c8e80c944d1ea9fa717
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Mon Jan 6 12:23:00 2020 +0900
Reduce process duration of test_Http2FrequencyCounter
(cherry picked from commit 0ad851937e66351b2dbee640678b3f0b9e157da8)
---
proxy/http2/Http2FrequencyCounter.cc | 8 +-
proxy/http2/Http2FrequencyCounter.h | 3 +
.../http2/unit_tests/test_Http2FrequencyCounter.cc | 102 +++++++++++----------
3 files changed, 62 insertions(+), 51 deletions(-)
diff --git a/proxy/http2/Http2FrequencyCounter.cc b/proxy/http2/Http2FrequencyCounter.cc
index dfe08b9..9fab3e6 100644
--- a/proxy/http2/Http2FrequencyCounter.cc
+++ b/proxy/http2/Http2FrequencyCounter.cc
@@ -26,7 +26,7 @@
void
Http2FrequencyCounter::increment(uint16_t amount)
{
- ink_hrtime hrtime_sec = ink_hrtime_to_sec(Thread::get_hrtime());
+ ink_hrtime hrtime_sec = this->_get_hrtime();
uint8_t counter_index = ((hrtime_sec % 60) >= 30);
uint8_t last_index = ((this->_last_update % 60) >= 30);
@@ -53,3 +53,9 @@ Http2FrequencyCounter::get_count()
{
return this->_count[0] + this->_count[1];
}
+
+ink_hrtime
+Http2FrequencyCounter::_get_hrtime()
+{
+ return ink_hrtime_to_sec(Thread::get_hrtime());
+}
diff --git a/proxy/http2/Http2FrequencyCounter.h b/proxy/http2/Http2FrequencyCounter.h
index 9d2ed73..0b6de17 100644
--- a/proxy/http2/Http2FrequencyCounter.h
+++ b/proxy/http2/Http2FrequencyCounter.h
@@ -35,4 +35,7 @@ public:
protected:
uint16_t _count[2] = {0};
ink_hrtime _last_update = 0;
+
+private:
+ virtual ink_hrtime _get_hrtime();
};
diff --git a/proxy/http2/unit_tests/test_Http2FrequencyCounter.cc b/proxy/http2/unit_tests/test_Http2FrequencyCounter.cc
index a1c0487..b69d58f 100644
--- a/proxy/http2/unit_tests/test_Http2FrequencyCounter.cc
+++ b/proxy/http2/unit_tests/test_Http2FrequencyCounter.cc
@@ -29,12 +29,22 @@ class TestHttp2FrequencyCounter : public Http2FrequencyCounter
{
public:
void
- set_internal_state(ink_hrtime last_update_sec, uint16_t count_0, uint16_t count_1)
+ set_internal_state(ink_hrtime now, ink_hrtime last_update_sec, uint16_t count_0, uint16_t count_1)
{
+ this->_now = now;
this->_last_update = last_update_sec;
this->_count[0] = count_0;
this->_count[1] = count_1;
}
+
+private:
+ ink_hrtime
+ _get_hrtime() override
+ {
+ return this->_now;
+ }
+
+ ink_hrtime _now = 0;
};
TEST_CASE("Http2FrequencyCounter_basic", "[http2][Http2FrequencyCounter]")
@@ -49,47 +59,45 @@ TEST_CASE("Http2FrequencyCounter_basic", "[http2][Http2FrequencyCounter]")
counter.increment(2);
REQUIRE(counter.get_count() == 3);
- counter.set_internal_state(ink_hrtime_to_sec(Thread::get_hrtime()) - 10, 1, 2);
+ ink_hrtime now = ink_hrtime_to_sec(Thread::get_hrtime_updated());
+ counter.set_internal_state(now, now - 10, 1, 2);
REQUIRE(counter.get_count() == 3);
}
SECTION("Update at 0")
{
ink_hrtime now = ink_hrtime_to_sec(Thread::get_hrtime_updated());
- while (now % 60 != 0) {
- sleep(1);
- now = ink_hrtime_to_sec(Thread::get_hrtime_updated());
- }
+ now -= now % 60;
- counter.set_internal_state(now - 5, 1, 2);
+ counter.set_internal_state(now, now - 5, 1, 2);
counter.increment();
CHECK(counter.get_count() == 3);
- counter.set_internal_state(now - 10, 1, 2);
+ counter.set_internal_state(now, now - 10, 1, 2);
counter.increment();
CHECK(counter.get_count() == 3);
- counter.set_internal_state(now - 20, 1, 2);
+ counter.set_internal_state(now, now - 20, 1, 2);
counter.increment();
CHECK(counter.get_count() == 3);
- counter.set_internal_state(now - 30, 1, 2);
+ counter.set_internal_state(now, now - 30, 1, 2);
counter.increment();
CHECK(counter.get_count() == 3);
- counter.set_internal_state(now - 40, 1, 2);
+ counter.set_internal_state(now, now - 40, 1, 2);
counter.increment();
CHECK(counter.get_count() == 1);
- counter.set_internal_state(now - 50, 1, 2);
+ counter.set_internal_state(now, now - 50, 1, 2);
counter.increment();
CHECK(counter.get_count() == 1);
- counter.set_internal_state(now - 60, 1, 2);
+ counter.set_internal_state(now, now - 60, 1, 2);
counter.increment();
CHECK(counter.get_count() == 1);
- counter.set_internal_state(now - 70, 1, 2);
+ counter.set_internal_state(now, now - 70, 1, 2);
counter.increment();
CHECK(counter.get_count() == 1);
}
@@ -97,40 +105,38 @@ TEST_CASE("Http2FrequencyCounter_basic", "[http2][Http2FrequencyCounter]")
SECTION("Update at 10")
{
ink_hrtime now = ink_hrtime_to_sec(Thread::get_hrtime_updated());
- while (now % 60 != 10) {
- sleep(1);
- now = ink_hrtime_to_sec(Thread::get_hrtime_updated());
- }
+ now -= now % 60;
+ now += 10;
- counter.set_internal_state(now - 5, 1, 2);
+ counter.set_internal_state(now, now - 5, 1, 2);
counter.increment();
CHECK(counter.get_count() == 4);
- counter.set_internal_state(now - 10, 1, 2);
+ counter.set_internal_state(now, now - 10, 1, 2);
counter.increment();
CHECK(counter.get_count() == 4);
- counter.set_internal_state(now - 20, 1, 2);
+ counter.set_internal_state(now, now - 20, 1, 2);
counter.increment();
CHECK(counter.get_count() == 3);
- counter.set_internal_state(now - 30, 1, 2);
+ counter.set_internal_state(now, now - 30, 1, 2);
counter.increment();
CHECK(counter.get_count() == 3);
- counter.set_internal_state(now - 40, 1, 2);
+ counter.set_internal_state(now, now - 40, 1, 2);
counter.increment();
CHECK(counter.get_count() == 3);
- counter.set_internal_state(now - 50, 1, 2);
+ counter.set_internal_state(now, now - 50, 1, 2);
counter.increment();
CHECK(counter.get_count() == 1);
- counter.set_internal_state(now - 60, 1, 2);
+ counter.set_internal_state(now, now - 60, 1, 2);
counter.increment();
CHECK(counter.get_count() == 1);
- counter.set_internal_state(now - 70, 1, 2);
+ counter.set_internal_state(now, now - 70, 1, 2);
counter.increment();
CHECK(counter.get_count() == 1);
}
@@ -138,40 +144,38 @@ TEST_CASE("Http2FrequencyCounter_basic", "[http2][Http2FrequencyCounter]")
SECTION("Update at 30")
{
ink_hrtime now = ink_hrtime_to_sec(Thread::get_hrtime_updated());
- while (now % 60 != 30) {
- sleep(1);
- now = ink_hrtime_to_sec(Thread::get_hrtime_updated());
- }
+ now -= now % 60;
+ now += 30;
- counter.set_internal_state(now - 5, 1, 2);
+ counter.set_internal_state(now, now - 5, 1, 2);
counter.increment();
CHECK(counter.get_count() == 2);
- counter.set_internal_state(now - 10, 1, 2);
+ counter.set_internal_state(now, now - 10, 1, 2);
counter.increment();
CHECK(counter.get_count() == 2);
- counter.set_internal_state(now - 20, 1, 2);
+ counter.set_internal_state(now, now - 20, 1, 2);
counter.increment();
CHECK(counter.get_count() == 2);
- counter.set_internal_state(now - 30, 1, 2);
+ counter.set_internal_state(now, now - 30, 1, 2);
counter.increment();
CHECK(counter.get_count() == 2);
- counter.set_internal_state(now - 40, 1, 2);
+ counter.set_internal_state(now, now - 40, 1, 2);
counter.increment();
CHECK(counter.get_count() == 1);
- counter.set_internal_state(now - 50, 1, 2);
+ counter.set_internal_state(now, now - 50, 1, 2);
counter.increment();
CHECK(counter.get_count() == 1);
- counter.set_internal_state(now - 60, 1, 2);
+ counter.set_internal_state(now, now - 60, 1, 2);
counter.increment();
CHECK(counter.get_count() == 1);
- counter.set_internal_state(now - 70, 1, 2);
+ counter.set_internal_state(now, now - 70, 1, 2);
counter.increment();
CHECK(counter.get_count() == 1);
}
@@ -179,40 +183,38 @@ TEST_CASE("Http2FrequencyCounter_basic", "[http2][Http2FrequencyCounter]")
SECTION("Update at 40")
{
ink_hrtime now = ink_hrtime_to_sec(Thread::get_hrtime_updated());
- while (now % 60 != 40) {
- sleep(1);
- now = ink_hrtime_to_sec(Thread::get_hrtime_updated());
- }
+ now -= now % 60;
+ now += 40;
- counter.set_internal_state(now - 5, 1, 2);
+ counter.set_internal_state(now, now - 5, 1, 2);
counter.increment();
CHECK(counter.get_count() == 4);
- counter.set_internal_state(now - 10, 1, 2);
+ counter.set_internal_state(now, now - 10, 1, 2);
counter.increment();
CHECK(counter.get_count() == 4);
- counter.set_internal_state(now - 20, 1, 2);
+ counter.set_internal_state(now, now - 20, 1, 2);
counter.increment();
CHECK(counter.get_count() == 2);
- counter.set_internal_state(now - 30, 1, 2);
+ counter.set_internal_state(now, now - 30, 1, 2);
counter.increment();
CHECK(counter.get_count() == 2);
- counter.set_internal_state(now - 40, 1, 2);
+ counter.set_internal_state(now, now - 40, 1, 2);
counter.increment();
CHECK(counter.get_count() == 2);
- counter.set_internal_state(now - 50, 1, 2);
+ counter.set_internal_state(now, now - 50, 1, 2);
counter.increment();
CHECK(counter.get_count() == 1);
- counter.set_internal_state(now - 60, 1, 2);
+ counter.set_internal_state(now, now - 60, 1, 2);
counter.increment();
CHECK(counter.get_count() == 1);
- counter.set_internal_state(now - 70, 1, 2);
+ counter.set_internal_state(now, now - 70, 1, 2);
counter.increment();
CHECK(counter.get_count() == 1);
}
[trafficserver] 04/05: Doc bugs
Posted by zw...@apache.org.
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 f2f4558a152008783583115af4d3d5bd9e11bc18
Author: Tucker <tu...@siden.io>
AuthorDate: Mon Jan 6 16:58:09 2020 -0600
Doc bugs
* reject is not a valid filter keyword. change to "action"
* aggregate operator should be AVG, not AVERAGE
(cherry picked from commit f2716faad07c04f72bce357866cd42e15fc1add0)
---
doc/admin-guide/logging/examples.en.rst | 5 +++--
.../ja/LC_MESSAGES/admin-guide/monitoring/logging/summary-logs.en.po | 4 ++--
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/doc/admin-guide/logging/examples.en.rst b/doc/admin-guide/logging/examples.en.rst
index 84b919c..991cfdd 100644
--- a/doc/admin-guide/logging/examples.en.rst
+++ b/doc/admin-guide/logging/examples.en.rst
@@ -333,12 +333,13 @@ the request to clients during that hour.
logging:
formats:
- name: originrepformat
- format: '%<FIRST(cqtq)> %<COUNT(*)> %<AVERAGE(ttms)>'
+ format: '%<FIRST(cqtq)> %<COUNT(*)> %<AVG(ttms)>'
interval: 3600
filters:
- name: originfilter
- reject: crc CONTAINS "HIT"
+ action: reject
+ condition: crc CONTAINS "HIT"
logs:
- mode: ascii
diff --git a/doc/locale/ja/LC_MESSAGES/admin-guide/monitoring/logging/summary-logs.en.po b/doc/locale/ja/LC_MESSAGES/admin-guide/monitoring/logging/summary-logs.en.po
index 4019d6a..f3056d4 100644
--- a/doc/locale/ja/LC_MESSAGES/admin-guide/monitoring/logging/summary-logs.en.po
+++ b/doc/locale/ja/LC_MESSAGES/admin-guide/monitoring/logging/summary-logs.en.po
@@ -59,7 +59,7 @@ msgid "``SUM``"
msgstr ""
#: ../../../admin-guide/monitoring/logging/summary-logs.en.rst:38
-msgid "``AVERAGE``"
+msgid "``AVG``"
msgstr ""
#: ../../../admin-guide/monitoring/logging/summary-logs.en.rst:39
@@ -82,7 +82,7 @@ msgstr ""
#: ../../../admin-guide/monitoring/logging/summary-logs.en.rst:52
msgid ""
"Where ``operator`` is one of the five aggregate operators (``COUNT``, "
-"``SUM``, ``AVERAGE``, ``FIRST``, ``LAST``); ``field`` is the logging field "
+"``SUM``, ``AVG``, ``FIRST``, ``LAST``); ``field`` is the logging field "
"you want to aggregate; and ``n`` is the interval (in seconds) between "
"summary log entries."
msgstr ""