You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by bc...@apache.org on 2016/10/15 23:03:34 UTC

[trafficserver] branch 7.0.x updated (7db28a6 -> d413eb5)

This is an automated email from the ASF dual-hosted git repository.

bcall pushed a change to branch 7.0.x
in repository https://git-dual.apache.org/repos/asf/trafficserver.git.

      from  7db28a6   TS-4915: Crash from hostdb in PriorityQueueLess
       new  0a1215c   TS-4885: Correct the calculation of fds_throttle and fds_limit
       new  0a8ee63   TS-4626: LogFile::close_file should not delete m_log handle
       new  3eb061f   TS-4934: Remove invalid assert
       new  d413eb5   TS-4949: Disables the fuzzy revalidation logic by default

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "adds" were already present in the repository and have only
been added to this reference.


Summary of changes:
 doc/admin-guide/configuration/cache-basics.en.rst  | 59 ----------------------
 doc/admin-guide/files/records.config.en.rst        | 17 +++++--
 .../admin-guide/files/records.config.en.po         |  3 +-
 mgmt/RecordsConfig.cc                              |  4 +-
 proxy/Main.cc                                      |  4 +-
 proxy/http/HttpTransact.cc                         |  2 +-
 proxy/http2/Http2Stream.cc                         |  2 -
 proxy/logging/LogFile.cc                           |  2 -
 8 files changed, 19 insertions(+), 74 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].

[trafficserver] 01/04: TS-4885: Correct the calculation of fds_throttle and fds_limit

Posted by bc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

bcall pushed a commit to branch 7.0.x
in repository https://git-dual.apache.org/repos/asf/trafficserver.git

commit 0a1215c03b68c527fee4471fb93fee529e0a3999
Author: Oknet Xu <xu...@skyguard.com.cn>
AuthorDate: Thu Sep 22 17:04:20 2016 +0800

    TS-4885: Correct the calculation of fds_throttle and fds_limit
    
    (cherry picked from commit 98bdac00dabc39d168eeddf19755abc5160d4c33)
---
 proxy/Main.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/proxy/Main.cc b/proxy/Main.cc
index 0b90900..125558d 100644
--- a/proxy/Main.cc
+++ b/proxy/Main.cc
@@ -904,7 +904,7 @@ check_fd_limit()
 {
   int fds_throttle = -1;
   REC_ReadConfigInteger(fds_throttle, "proxy.config.net.connections_throttle");
-  if (fds_throttle > fds_limit + THROTTLE_FD_HEADROOM) {
+  if (fds_throttle > fds_limit - THROTTLE_FD_HEADROOM) {
     int new_fds_throttle = fds_limit - THROTTLE_FD_HEADROOM;
     if (new_fds_throttle < 1) {
       ink_abort("too few file descriptors (%d) available", fds_limit);
@@ -1024,7 +1024,7 @@ adjust_sys_settings(void)
   REC_ReadConfigInteger(fds_throttle, "proxy.config.net.connections_throttle");
 
   if (getrlimit(RLIMIT_NOFILE, &lim) == 0) {
-    if (fds_throttle > (int)(lim.rlim_cur + THROTTLE_FD_HEADROOM)) {
+    if (fds_throttle > (int)(lim.rlim_cur - THROTTLE_FD_HEADROOM)) {
       lim.rlim_cur = (lim.rlim_max = (rlim_t)fds_throttle);
       if (setrlimit(RLIMIT_NOFILE, &lim) == 0 && getrlimit(RLIMIT_NOFILE, &lim) == 0) {
         fds_limit = (int)lim.rlim_cur;

-- 
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>.

[trafficserver] 04/04: TS-4949: Disables the fuzzy revalidation logic by default

Posted by bc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

bcall pushed a commit to branch 7.0.x
in repository https://git-dual.apache.org/repos/asf/trafficserver.git

commit d413eb5d425a5b93dbdec3df6e2bf95bbec9534f
Author: Leif Hedstrom <zw...@apache.org>
AuthorDate: Tue Oct 11 10:18:07 2016 -0600

    TS-4949: Disables the fuzzy revalidation logic by default
    
    (cherry picked from commit da576746185520663aceaea3ddc8f461c8d3eea5)
---
 doc/admin-guide/configuration/cache-basics.en.rst  | 59 ----------------------
 doc/admin-guide/files/records.config.en.rst        | 17 +++++--
 .../admin-guide/files/records.config.en.po         |  3 +-
 mgmt/RecordsConfig.cc                              |  4 +-
 proxy/http/HttpTransact.cc                         |  2 +-
 5 files changed, 17 insertions(+), 68 deletions(-)

diff --git a/doc/admin-guide/configuration/cache-basics.en.rst b/doc/admin-guide/configuration/cache-basics.en.rst
index f1610c7..7351d1e 100644
--- a/doc/admin-guide/configuration/cache-basics.en.rst
+++ b/doc/admin-guide/configuration/cache-basics.en.rst
@@ -797,65 +797,6 @@ of the object is completed::
 
     CONFIG proxy.config.cache.read_while_writer_retry.delay INT 50
 
-.. _fuzzy-revalidation:
-
-Fuzzy Revalidation
-------------------
-
-.. note::
-
-    These options are deprecated as of v6.2.0.
-
-Traffic Server can be set to attempt to revalidate an object before it becomes
-stale in cache. :file:`records.config` contains the settings::
-
-    CONFIG proxy.config.http.cache.fuzz.time INT 240
-    CONFIG proxy.config.http.cache.fuzz.min_time INT 0
-    CONFIG proxy.config.http.cache.fuzz.probability FLOAT 0.005
-
-For every request for an object that occurs
-:ts:cv:`proxy.config.http.cache.fuzz.time` before (in the example above, 240
-seconds) the object is set to become stale, there is a small
-chance (:ts:cv:`proxy.config.http.cache.fuzz.probability` == 0.5%) that the
-request will trigger a revalidation request to the origin.
-
-.. note::
-
-    When revalidation occurs, the requested object is no longer available to be
-    served from cache. Subsequent requests for that object will be proxied to
-    the origin.
-
-For objects getting a few requests per second, these settings would offer a
-fairly low probability of revalidating the cached object before it becomes
-stale. This feature is not typically necessary at those rates, though, since
-odds are only one or a small number of connections would hit origin upon the
-objects going stale.
-
-Once request raise rise, the same ``fuzz.probability`` leads to a greater
-chance the object may be revalidated before becoming stale. This can prevent
-multiple clients simultaneously triggering contact with the origin server
-under higher loads, as they would do if no fuzziness was employed for
-revalidations.
-
-These settings are also overridable by remap rules and via plugins, so can be
-adjusted per request if necessary.
-
-Finally, :ts:cv:`proxy.config.http.cache.fuzz.min_time` allows for
-different time periods to evaluate the probability of revalidation for small
-TTLs and large TTLs. Objects with small TTLs will start "rolling the
-revalidation dice" near the ``fuzz.min_time``, while objects with large TTLs
-would start at ``fuzz.time``.
-
-A logarithmic like function between determines the revalidation evaluation
-start time (which will be between ``fuzz.min_time`` and ``fuzz.time``). As the
-object gets closer to expiring, the window start becomes more likely. By
-default this setting is not enabled, but should be enabled anytime you have
-objects with small TTLs. Note that this option predates overridable
-configurations, so you can achieve something similar with a plugin or
-:file:`remap.config` settings.
-
-These configuration options are similar to Squid's refresh_stale_hit
-configuration option.
 
 Open Read Retry Timeout
 -----------------------
diff --git a/doc/admin-guide/files/records.config.en.rst b/doc/admin-guide/files/records.config.en.rst
index 71a4d33..d4e8f23 100644
--- a/doc/admin-guide/files/records.config.en.rst
+++ b/doc/admin-guide/files/records.config.en.rst
@@ -2079,16 +2079,20 @@ Heuristic Expiration
    aging factor is applied, the final maximum age calculated will never be
    higher than the value in this variable.
 
-.. ts:cv:: CONFIG proxy.config.http.cache.fuzz.time INT 240
+.. ts:cv:: CONFIG proxy.config.http.cache.fuzz.time INT 0
    :deprecated:
    :reloadable:
    :overridable:
 
    How often |TS| checks for an early refresh, during the period before the
-   document stale time. The interval specified must be in seconds. See the
-   section on :ref:`fuzzy-revalidation` for more details.
+   document stale time. The interval specified must be in seconds.
 
-.. ts:cv:: CONFIG proxy.config.http.cache.fuzz.probability FLOAT 0.005
+.. note::
+
+   Previous versions of Apache Traffic Server defaulted this to 240s. This
+   feature is deprecated as of ATS v6.2.0.
+
+.. ts:cv:: CONFIG proxy.config.http.cache.fuzz.probability FLOAT 0.0
    :deprecated:
    :reloadable:
    :overridable:
@@ -2096,6 +2100,11 @@ Heuristic Expiration
    The probability that a refresh is made on a document during the fuzz time
    specified in :ts:cv:`proxy.config.http.cache.fuzz.time`.
 
+.. note::
+
+   Previous versions of Apache Traffic Server defaulted this to 0.005 (0.5%).
+   This feature is deprecated as of ATS v6.2.0
+
 .. ts:cv:: CONFIG proxy.config.http.cache.fuzz.min_time INT 0
    :deprecated:
    :reloadable:
diff --git a/doc/locale/ja/LC_MESSAGES/admin-guide/files/records.config.en.po b/doc/locale/ja/LC_MESSAGES/admin-guide/files/records.config.en.po
index 07df0de..843550f 100644
--- a/doc/locale/ja/LC_MESSAGES/admin-guide/files/records.config.en.po
+++ b/doc/locale/ja/LC_MESSAGES/admin-guide/files/records.config.en.po
@@ -3305,8 +3305,7 @@ msgstr ""
 #: ../../../admin-guide/files/records.config.en.rst:2052
 msgid ""
 "How often |TS| checks for an early refresh, during the period before the "
-"document stale time. The interval specified must be in seconds. See the "
-"section on :ref:`fuzzy-revalidation` for more details."
+"document stale time. The interval specified must be in seconds."
 msgstr ""
 
 #: ../../../admin-guide/files/records.config.en.rst:2061
diff --git a/mgmt/RecordsConfig.cc b/mgmt/RecordsConfig.cc
index 4a387b7..e0b2e71 100644
--- a/mgmt/RecordsConfig.cc
+++ b/mgmt/RecordsConfig.cc
@@ -710,11 +710,11 @@ static const RecordElement RecordsConfig[] =
   ,
   {RECT_CONFIG, "proxy.config.http.cache.guaranteed_max_lifetime", RECD_INT, "31536000", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.cache.fuzz.time", RECD_INT, "240", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.cache.fuzz.time", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.http.cache.fuzz.min_time", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.cache.fuzz.probability", RECD_FLOAT, "0.005", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.cache.fuzz.probability", RECD_FLOAT, "0.0", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
   ,
 
   //        #########################################
diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc
index 1146ad7..2e42d42 100644
--- a/proxy/http/HttpTransact.cc
+++ b/proxy/http/HttpTransact.cc
@@ -7435,7 +7435,7 @@ HttpTransact::what_is_document_freshness(State *s, HTTPHdr *client_request, HTTP
 
   // Fuzz the freshness to prevent too many revalidates to popular
   //  documents at the same time
-  if (s->txn_conf->freshness_fuzz_time >= 0) {
+  if ((s->txn_conf->freshness_fuzz_time > 0) && (s->txn_conf->freshness_fuzz_prob > 0.0)) {
     fresh_limit = fresh_limit - calculate_freshness_fuzz(s, fresh_limit);
     fresh_limit = max(0, fresh_limit);
     fresh_limit = min((int)s->txn_conf->cache_guaranteed_max_lifetime, fresh_limit);

-- 
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>.

[trafficserver] 02/04: TS-4626: LogFile::close_file should not delete m_log handle

Posted by bc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

bcall pushed a commit to branch 7.0.x
in repository https://git-dual.apache.org/repos/asf/trafficserver.git

commit 0a8ee63145622bb4e1fd52fc63a518c3323621e9
Author: Daniel Xu <dl...@yahoo.com>
AuthorDate: Wed Sep 28 12:42:54 2016 -0500

    TS-4626: LogFile::close_file should not delete m_log handle
    
    LogFile::close_file was incorrectly deleting the m_log object.
    This caused potential race conditions when flushing m_log since
    there aren't any locks protecting m_log accesses.
    
    When the underlying log file on disk is deleted, it is fine to
    not delete m_log. It's fine because the actual flush function
    in Log::flush_thread_main checks to see if m_log is open before
    doing any writes.
    
    (cherry picked from commit 3af46b13d975ae1eee044dc934ba38e63ce5cee2)
---
 proxy/logging/LogFile.cc | 2 --
 1 file changed, 2 deletions(-)

diff --git a/proxy/logging/LogFile.cc b/proxy/logging/LogFile.cc
index 30cd31a..08a4968 100644
--- a/proxy/logging/LogFile.cc
+++ b/proxy/logging/LogFile.cc
@@ -237,8 +237,6 @@ LogFile::close_file()
     } else if (m_log) {
       m_log->close_file();
       Debug("log-file", "LogFile %s is closed", m_log->get_name());
-      delete m_log;
-      m_log = NULL;
     } else {
       Warning("LogFile %s is open but was not closed", m_name);
     }

-- 
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>.

[trafficserver] 03/04: TS-4934: Remove invalid assert

Posted by bc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

bcall pushed a commit to branch 7.0.x
in repository https://git-dual.apache.org/repos/asf/trafficserver.git

commit 3eb061f33d4d4cd3cbd83064d5ccb480ed8b7533
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Wed Oct 5 14:17:20 2016 +0900

    TS-4934: Remove invalid assert
    
    (cherry picked from commit 6e72b2a8e52a421f2e3bc88cf476460123e88fc3)
---
 proxy/http2/Http2Stream.cc | 2 --
 1 file changed, 2 deletions(-)

diff --git a/proxy/http2/Http2Stream.cc b/proxy/http2/Http2Stream.cc
index d1fc00e..8b80d1b 100644
--- a/proxy/http2/Http2Stream.cc
+++ b/proxy/http2/Http2Stream.cc
@@ -329,8 +329,6 @@ Http2Stream::do_io_close(int /* flags */)
       // Wee will be removed at send_data_frames or closing connection phase
       static_cast<Http2ClientSession *>(parent)->connection_state.send_data_frames(this);
     }
-    // Check to see if the stream is in the closed state
-    ink_assert(get_state() == HTTP2_STREAM_STATE_CLOSED || get_state() == HTTP2_STREAM_STATE_HALF_CLOSED_REMOTE);
 
     clear_timers();
     clear_io_events();

-- 
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>.