You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by su...@apache.org on 2015/05/20 21:19:42 UTC

[1/2] trafficserver git commit: [TS-3622]: Add a bound to read_while_writer retries with a config setting

Repository: trafficserver
Updated Branches:
  refs/heads/master fe50aa2db -> f30ca348b


[TS-3622]: Add a bound to read_while_writer retries with a config setting


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

Branch: refs/heads/master
Commit: 1f1334530fe66feea9e4896cebf58d83ef10ff3e
Parents: fe50aa2
Author: Sudheer Vinukonda <su...@yahoo-inc.com>
Authored: Wed May 20 19:18:36 2015 +0000
Committer: Sudheer Vinukonda <su...@yahoo-inc.com>
Committed: Wed May 20 19:18:36 2015 +0000

----------------------------------------------------------------------
 iocore/cache/Cache.cc          | 4 ++++
 iocore/cache/CacheRead.cc      | 3 ++-
 iocore/cache/P_CacheInternal.h | 1 +
 mgmt/RecordsConfig.cc          | 2 ++
 4 files changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/1f133453/iocore/cache/Cache.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/Cache.cc b/iocore/cache/Cache.cc
index bb20397..56fc808 100644
--- a/iocore/cache/Cache.cc
+++ b/iocore/cache/Cache.cc
@@ -78,6 +78,7 @@ int cache_config_enable_checksum = 0;
 int cache_config_alt_rewrite_max_size = 4096;
 int cache_config_read_while_writer = 0;
 int cache_config_mutex_retry_delay = 2;
+int cache_config_read_while_writer_max_retries = 10;
 #ifdef HTTP_CACHE
 static int enable_cache_empty_http_doc = 0;
 /// Fix up a specific known problem with the 4.2.0 release.
@@ -3721,6 +3722,9 @@ ink_cache_init(ModuleVersion v)
   REC_EstablishStaticConfigInt32(cache_config_mutex_retry_delay, "proxy.config.cache.mutex_retry_delay");
   Debug("cache_init", "proxy.config.cache.mutex_retry_delay = %dms", cache_config_mutex_retry_delay);
 
+  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_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/1f133453/iocore/cache/CacheRead.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/CacheRead.cc b/iocore/cache/CacheRead.cc
index 38ce268..bba2ec2 100644
--- a/iocore/cache/CacheRead.cc
+++ b/iocore/cache/CacheRead.cc
@@ -364,7 +364,8 @@ CacheVC::openReadFromWriter(int event, Event *e)
   // allow reading from unclosed writer for http requests only.
   ink_assert(frag_type == CACHE_FRAG_TYPE_HTTP || write_vc->closed);
   if (!write_vc->closed && !write_vc->fragment) {
-    if (!cache_config_read_while_writer || frag_type != CACHE_FRAG_TYPE_HTTP) {
+    if (!cache_config_read_while_writer || frag_type != CACHE_FRAG_TYPE_HTTP ||
+        writer_lock_retry >= cache_config_read_while_writer_max_retries) {
       MUTEX_RELEASE(lock);
       return openReadFromWriterFailure(CACHE_EVENT_OPEN_READ_FAILED, (Event *)-err);
     }

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/1f133453/iocore/cache/P_CacheInternal.h
----------------------------------------------------------------------
diff --git a/iocore/cache/P_CacheInternal.h b/iocore/cache/P_CacheInternal.h
index 35942b3..96d08a3 100644
--- a/iocore/cache/P_CacheInternal.h
+++ b/iocore/cache/P_CacheInternal.h
@@ -226,6 +226,7 @@ extern int cache_config_hit_evacuate_size_limit;
 extern int cache_config_force_sector_size;
 extern int cache_config_target_fragment_size;
 extern int cache_config_mutex_retry_delay;
+extern int cache_config_read_while_writer_max_retries;
 #if TS_USE_INTERIM_CACHE == 1
 extern int good_interim_disks;
 #endif

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/1f133453/mgmt/RecordsConfig.cc
----------------------------------------------------------------------
diff --git a/mgmt/RecordsConfig.cc b/mgmt/RecordsConfig.cc
index c655c20..8fa1ba4 100644
--- a/mgmt/RecordsConfig.cc
+++ b/mgmt/RecordsConfig.cc
@@ -963,6 +963,8 @@ static const RecordElement RecordsConfig[] =
   ,
   {RECT_CONFIG, "proxy.config.cache.mutex_retry_delay", RECD_INT, "2", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
   ,
+  {RECT_CONFIG, "proxy.config.cache.read_while_writer.max_retries", RECD_INT, "10", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  ,
 
   //##############################################################################
   //#


[2/2] trafficserver git commit: update CHANGES

Posted by su...@apache.org.
update CHANGES


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

Branch: refs/heads/master
Commit: f30ca348b5eeeed312c76edb1588dd5fcb17707d
Parents: 1f13345
Author: Sudheer Vinukonda <su...@yahoo-inc.com>
Authored: Wed May 20 19:19:30 2015 +0000
Committer: Sudheer Vinukonda <su...@yahoo-inc.com>
Committed: Wed May 20 19:19:30 2015 +0000

----------------------------------------------------------------------
 CHANGES | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f30ca348/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index fe2591f..c1909ff 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,7 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache Traffic Server 6.0.0
+  
+  *) [TS-3622]: Add a bound to read_while_writer retries with a config setting
 
   *) [TS-3618] Crashes in traffic_cop on shutdown / restart