[TS-3767]: Change the config name to be consistent with the other setting  and 
add docs.


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

Branch: refs/heads/master
Commit: 086bf328c2e19f08b84b75da484f213cbe5c6357
Parents: 3c57dc6
Author: Sudheer Vinukonda <[email protected]>
Authored: Tue Jul 14 20:48:24 2015 +0000
Committer: Sudheer Vinukonda <[email protected]>
Committed: Tue Jul 14 20:48:24 2015 +0000

----------------------------------------------------------------------
 doc/admin/http-proxy-caching.en.rst               |  9 ++++++---
 doc/reference/configuration/records.config.en.rst | 16 +++++++++++++---
 iocore/cache/Cache.cc                             |  4 ++--
 mgmt/RecordsConfig.cc                             |  2 +-
 4 files changed, 22 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/086bf328/doc/admin/http-proxy-caching.en.rst
----------------------------------------------------------------------
diff --git a/doc/admin/http-proxy-caching.en.rst 
b/doc/admin/http-proxy-caching.en.rst
index 05a93d5..9c86609 100644
--- a/doc/admin/http-proxy-caching.en.rst
+++ b/doc/admin/http-proxy-caching.en.rst
@@ -784,12 +784,15 @@ All four configurations are required, for the following 
reasons:
 Once these are enabled, you have something that is very close, but not quite
 the same, to Squid's Collapsed Forwarding.
 
-In addition to the above settings, the setting 
:ts:cv:`proxy.config.cache.read_while_writer.max_retries`
-allows to control the number of retries (100msec each) TS attempts to trigger
-read-while-writer until the download of first fragment of the object is 
completed::
+In addition to the above settings, the settings 
:ts:cv:`proxy.config.cache.read_while_writer.max_retries`
+and :ts:cv:`proxy.config.cache.read_while_writer.delay` allow to control the 
number
+of retries TS attempts to trigger read-while-writer until the download of 
first fragment
+of the object is completed::
 
     CONFIG proxy.config.cache.read_while_writer.max_retries INT 10
 
+    CONFIG proxy.config.cache.read_while_writer.delay INT 50
+
 .. _fuzzy-revalidation:
 
 Fuzzy Revalidation

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/086bf328/doc/reference/configuration/records.config.en.rst
----------------------------------------------------------------------
diff --git a/doc/reference/configuration/records.config.en.rst 
b/doc/reference/configuration/records.config.en.rst
index 6baf5c3..5746a03 100644
--- a/doc/reference/configuration/records.config.en.rst
+++ b/doc/reference/configuration/records.config.en.rst
@@ -1288,9 +1288,19 @@ Cache Control
 .. ts:cv:: CONFIG proxy.config.cache.read_while_writer.max_retries INT 10
    :reloadable:
 
-   Specifies how many retries (100msec each) trafficserver attempts to trigger 
read_while_writer
-   on failing to obtain the write VC mutex or until the first fragment is 
downloaded for the
-   object being downloaded.
+   Specifies how many retries trafficserver attempts to trigger 
read_while_writer on failing
+   to obtain the write VC mutex or until the first fragment is downloaded for 
the
+   object being downloaded. The retry duration is specified using the setting
+   ts:cv:`proxy.config.cache.read_while_writer.delay`
+
+.. ts:cv:: CONFIG proxy.config.cache.read_while_writer.delay INT 50
+   :reloadable:
+
+   Specifies the delay in msec, trafficserver waits to reattempt 
read_while_writer
+   on failing to obtain the write VC mutex or until the first fragment is 
downloaded
+   for the object being downloaded. Note that trafficserver implements a 
progressive
+   delay in reattempting, by doubling the configured duration from the third 
reattempt
+   onwards.
 
 .. ts:cv:: CONFIG proxy.config.cache.force_sector_size INT 0
    :reloadable:

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/086bf328/iocore/cache/Cache.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/Cache.cc b/iocore/cache/Cache.cc
index aba1d0c..bfc5f84 100644
--- a/iocore/cache/Cache.cc
+++ b/iocore/cache/Cache.cc
@@ -3192,8 +3192,8 @@ ink_cache_init(ModuleVersion v)
   REC_EstablishStaticConfigInt32(cache_config_read_while_writer_max_retries, 
"proxy.config.cache.read_while_writer.max_retries");
   Debug("cache_init", "proxy.config.cache.read_while_writer.max_retries = %d", 
cache_config_read_while_writer_max_retries);
 
-  REC_EstablishStaticConfigInt32(cache_read_while_writer_retry_delay, 
"proxy.config.cache.read_while_writer_retry_delay");
-  Debug("cache_init", "proxy.config.cache.read_while_writer_retry_delay = 
%dms", cache_read_while_writer_retry_delay);
+  REC_EstablishStaticConfigInt32(cache_read_while_writer_retry_delay, 
"proxy.config.cache.read_while_writer_retry.delay");
+  Debug("cache_init", "proxy.config.cache.read_while_writer_retry.delay = 
%dms", cache_read_while_writer_retry_delay);
 
   REC_EstablishStaticConfigInt32(cache_config_hit_evacuate_percent, 
"proxy.config.cache.hit_evacuate_percent");
   Debug("cache_init", "proxy.config.cache.hit_evacuate_percent = %d", 
cache_config_hit_evacuate_percent);

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/086bf328/mgmt/RecordsConfig.cc
----------------------------------------------------------------------
diff --git a/mgmt/RecordsConfig.cc b/mgmt/RecordsConfig.cc
index 2f37b36..7ee3154 100644
--- a/mgmt/RecordsConfig.cc
+++ b/mgmt/RecordsConfig.cc
@@ -966,7 +966,7 @@ static const RecordElement RecordsConfig[] =
   ,
   {RECT_CONFIG, "proxy.config.cache.read_while_writer.max_retries", RECD_INT, 
"10", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.cache.read_while_writer_retry_delay", RECD_INT, 
"50", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cache.read_while_writer_retry.delay", RECD_INT, 
"50", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
   ,
 
   
//##############################################################################

Reply via email to