trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vmam...@apache.org
Subject [trafficserver] branch master updated: remove deprecated cache fuzz code
Date Mon, 08 May 2017 18:33:28 GMT
This is an automated email from the ASF dual-hosted git repository.

vmamidi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

The following commit(s) were added to refs/heads/master by this push:
       new  d510fc9   remove deprecated cache fuzz code
d510fc9 is described below

commit d510fc9bbf7f5713b97a1b1aa265618695285563
Author: vijayabhaskar <vijayabhaskar_mamidi@yahoo.com>
AuthorDate: Mon May 8 17:50:18 2017 +0000

    remove deprecated cache fuzz code
---
 .../api/functions/TSHttpOverridableConfig.en.rst   |  1 -
 lib/perl/lib/Apache/TS/AdminClient.pm              |  3 -
 lib/ts/apidefs.h.in                                |  3 -
 mgmt/RecordsConfig.cc                              |  6 --
 mgmt/api/APITestCliRemote.cc                       | 86 +++-------------------
 plugins/experimental/ts_lua/ts_lua_http_config.c   |  6 --
 proxy/InkAPI.cc                                    | 21 +-----
 proxy/InkAPITest.cc                                |  3 -
 proxy/http/HttpConfig.cc                           |  9 +--
 proxy/http/HttpConfig.h                            |  7 --
 proxy/http/HttpTransact.cc                         | 50 -------------
 11 files changed, 14 insertions(+), 181 deletions(-)

diff --git a/doc/developer-guide/api/functions/TSHttpOverridableConfig.en.rst b/doc/developer-guide/api/functions/TSHttpOverridableConfig.en.rst
index aba1acb..0f16897 100644
--- a/doc/developer-guide/api/functions/TSHttpOverridableConfig.en.rst
+++ b/doc/developer-guide/api/functions/TSHttpOverridableConfig.en.rst
@@ -80,7 +80,6 @@ c:member:`TS_CONFIG_HTTP_BACKGROUND_FILL_COMPLETED_THRESHOLD`       :ts:cv:`prox
 c:member:`TS_CONFIG_HTTP_CACHE_CACHE_RESPONSES_TO_COOKIES`          :ts:cv:`proxy.config.http.cache.cache_responses_to_cookies`
 c:member:`TS_CONFIG_HTTP_CACHE_CACHE_URLS_THAT_LOOK_DYNAMIC`        :ts:cv:`proxy.config.http.cache.cache_urls_that_look_dynamic`
 c:member:`TS_CONFIG_HTTP_CACHE_CLUSTER_CACHE_LOCAL`                 :ts:cv:`proxy.config.http.cache.cluster_cache_local`
-c:member:`TS_CONFIG_HTTP_CACHE_FUZZ_MIN_TIME`                       :ts:cv:`proxy.config.http.cache.fuzz.min_time`
 c:member:`TS_CONFIG_HTTP_CACHE_FUZZ_PROBABILITY`                    :ts:cv:`proxy.config.http.cache.fuzz.probability`
 c:member:`TS_CONFIG_HTTP_CACHE_FUZZ_TIME`                           :ts:cv:`proxy.config.http.cache.fuzz.time`
 c:member:`TS_CONFIG_HTTP_CACHE_GENERATION`                          :ts:cv:`proxy.config.http.cache.generation`
diff --git a/lib/perl/lib/Apache/TS/AdminClient.pm b/lib/perl/lib/Apache/TS/AdminClient.pm
index a29aad0..70e9514 100644
--- a/lib/perl/lib/Apache/TS/AdminClient.pm
+++ b/lib/perl/lib/Apache/TS/AdminClient.pm
@@ -452,9 +452,6 @@ The Apache Traffic Server Administration Manual will explain what these
strings
  proxy.config.http.cache.cache_responses_to_cookies
  proxy.config.http.cache.cache_urls_that_look_dynamic
  proxy.config.http.cache.enable_default_vary_headers
- proxy.config.http.cache.fuzz.min_time
- proxy.config.http.cache.fuzz.probability
- proxy.config.http.cache.fuzz.time
  proxy.config.http.cache.guaranteed_max_lifetime
  proxy.config.http.cache.guaranteed_min_lifetime
  proxy.config.http.cache.heuristic_lm_factor
diff --git a/lib/ts/apidefs.h.in b/lib/ts/apidefs.h.in
index 73ea3a4..bc23d8e 100644
--- a/lib/ts/apidefs.h.in
+++ b/lib/ts/apidefs.h.in
@@ -696,13 +696,10 @@ typedef enum {
   TS_CONFIG_HTTP_POST_CONNECT_ATTEMPTS_TIMEOUT,
   TS_CONFIG_HTTP_DOWN_SERVER_CACHE_TIME,
   TS_CONFIG_HTTP_DOWN_SERVER_ABORT_THRESHOLD,
-  TS_CONFIG_HTTP_CACHE_FUZZ_TIME,
-  TS_CONFIG_HTTP_CACHE_FUZZ_MIN_TIME,
   TS_CONFIG_HTTP_DOC_IN_CACHE_SKIP_DNS,
   TS_CONFIG_HTTP_BACKGROUND_FILL_ACTIVE_TIMEOUT,
   TS_CONFIG_HTTP_RESPONSE_SERVER_STR,
   TS_CONFIG_HTTP_CACHE_HEURISTIC_LM_FACTOR,
-  TS_CONFIG_HTTP_CACHE_FUZZ_PROBABILITY,
   TS_CONFIG_HTTP_BACKGROUND_FILL_COMPLETED_THRESHOLD,
   TS_CONFIG_NET_SOCK_PACKET_MARK_OUT,
   TS_CONFIG_NET_SOCK_PACKET_TOS_OUT,
diff --git a/mgmt/RecordsConfig.cc b/mgmt/RecordsConfig.cc
index f87463e..f00c07a 100644
--- a/mgmt/RecordsConfig.cc
+++ b/mgmt/RecordsConfig.cc
@@ -718,12 +718,6 @@ static const RecordElement RecordsConfig[] =
   ,
   {RECT_CONFIG, "proxy.config.http.cache.guaranteed_max_lifetime", RECD_INT, "31536000",
RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.cache.fuzz.time", RECD_INT, "0", RECU_DYNAMIC, RR_NULL,
RECC_NULL, nullptr, RECA_NULL}
-  ,
-  {RECT_CONFIG, "proxy.config.http.cache.fuzz.min_time", RECD_INT, "0", RECU_DYNAMIC, RR_NULL,
RECC_NULL, nullptr, RECA_NULL}
-  ,
-  {RECT_CONFIG, "proxy.config.http.cache.fuzz.probability", RECD_FLOAT, "0.0", RECU_DYNAMIC,
RR_NULL, RECC_NULL, nullptr, RECA_NULL}
-  ,
 
   //        #########################################
   //        # dynamic content & content negotiation #
diff --git a/mgmt/api/APITestCliRemote.cc b/mgmt/api/APITestCliRemote.cc
index 7efbeb8..b22454b 100644
--- a/mgmt/api/APITestCliRemote.cc
+++ b/mgmt/api/APITestCliRemote.cc
@@ -984,7 +984,6 @@ test_error_records()
   TSInt port1, new_port = 8080;
   TSActionNeedT action;
   TSMgmtError ret;
-  TSFloat flt1;
   TSCounter ctr1;
 
   printf("\n");
@@ -1008,13 +1007,6 @@ test_error_records()
   } else {
     printf("[TSRecordGetCounter]proxy.process.socks.connections_successful=%" PRId64 " \n",
ctr1);
   }
-
-  printf("\n");
-  if (TSRecordGetFloat("proxy.conig.http.cache.fuzz.probability", &flt1) != TS_ERR_OKAY)
{
-    printf("TSRecordGetFloat FAILED!\n");
-  } else {
-    printf("[TSRecordGetFloat] proxy.config.http.cache.fuzz.probability=%f\n", flt1);
-  }
 }
 
 /* ------------------------------------------------------------------------
@@ -1031,7 +1023,6 @@ test_records()
   char *rec_value;
   char new_str[] = "new_record_value";
   TSInt port1, port2, new_port  = 52432;
-  TSFloat flt1, flt2, new_flt   = 1.444;
   TSCounter ctr1, ctr2, new_ctr = 6666;
   TSMgmtError err;
 
@@ -1147,43 +1138,6 @@ test_records()
   }
   printf("\n");
 #endif
-
-#if TEST_FLOAT
-  printf("\n");
-  if (TSRecordGetFloat("proxy.config.http.cache.fuzz.probability", &flt1) != TS_ERR_OKAY)
{
-    printf("TSRecordGetFloat FAILED!\n");
-  } else {
-    printf("[TSRecordGetFloat] proxy.config.http.cache.fuzz.probability=%f\n", flt1);
-  }
-
-  if (TSRecordSetFloat("proxy.config.http.cache.fuzz.probability", new_flt, &action)
!= TS_ERR_OKAY) {
-    printf("TSRecordSetFloat FAILED!\n");
-  } else {
-    printf("[TSRecordSetFloat] proxy.config.http.cache.fuzz.probability=%f\n", new_flt);
-  }
-
-  if (TSRecordGetFloat("proxy.config.http.cache.fuzz.probability", &flt2) != TS_ERR_OKAY)
{
-    printf("TSRecordGetFloat FAILED!\n");
-  } else {
-    printf("[TSRecordGetFloat] proxy.config.http.cache.fuzz.probability=%f\n", flt2);
-  }
-  printf("\n");
-#endif
-
-#if TEST_REC_SET
-  printf("\n");
-  if (TSRecordSet("proxy.config.http.cache.fuzz.probability", "-0.3456", &action) !=
TS_ERR_OKAY) {
-    printf("TSRecordSet FAILED!\n");
-  } else {
-    printf("[TSRecordSet] proxy.config.http.cache.fuzz.probability=-0.3456\n");
-  }
-
-  if (TSRecordGetFloat("proxy.config.http.cache.fuzz.probability", &flt2) != TS_ERR_OKAY)
{
-    printf("TSRecordGetFloat FAILED!\n");
-  } else {
-    printf("[TSRecordGetFloat] proxy.config.http.cache.fuzz.probability=%f\n", flt2);
-  }
-#endif
 }
 
 // retrieves the value of the "proxy.config.xxx" record requested at input
@@ -1241,7 +1195,7 @@ test_record_get_mlt()
   TSStringList name_list;
   TSList rec_list;
   int i, num;
-  char *v1, *v2, *v3, *v6, *v7, *v8;
+  char *v1, *v2, *v3, *v6, *v7;
   TSMgmtError ret;
 
   name_list = TSStringListCreate();
@@ -1262,9 +1216,6 @@ test_record_get_mlt()
   const size_t v7_size = (sizeof(char) * (strlen("proxy.config.cop.core_signal") + 1));
   v7                   = (char *)TSmalloc(v7_size);
   ink_strlcpy(v7, "proxy.config.cop.core_signal", v7_size);
-  const size_t v8_size = (sizeof(char) * (strlen("proxy.config.http.cache.fuzz.probability")
+ 1));
-  v8                   = (char *)TSmalloc(v8_size);
-  ink_strlcpy(v8, "proxy.config.http.cache.fuzz.probability", v8_size);
 
   // add the names to the get_list
   TSStringListEnqueue(name_list, v1);
@@ -1272,7 +1223,6 @@ test_record_get_mlt()
   TSStringListEnqueue(name_list, v3);
   TSStringListEnqueue(name_list, v6);
   TSStringListEnqueue(name_list, v7);
-  TSStringListEnqueue(name_list, v8);
 
   num = TSStringListLen(name_list);
   printf("Num Records to Get: %d\n", num);
@@ -1326,7 +1276,7 @@ void
 test_record_set_mlt()
 {
   TSList list;
-  TSRecordEle *ele1, *ele2, *ele3, *ele4, *ele5;
+  TSRecordEle *ele1, *ele2, *ele3, *ele4;
   TSActionNeedT action = TS_ACTION_UNDEFINED;
   TSMgmtError err;
 
@@ -1337,31 +1287,25 @@ test_record_set_mlt()
   ele1->rec_type          = TS_REC_STRING;
   ele1->valueT.string_val = TSstrdup(ele1->rec_name);
 
-  ele2                   = TSRecordEleCreate(); // reread action
-  ele2->rec_name         = TSstrdup("proxy.config.http.cache.fuzz.probability");
-  ele2->rec_type         = TS_REC_FLOAT;
-  ele2->valueT.float_val = 0.1234;
+  ele2                 = TSRecordEleCreate(); // undefined action
+  ele2->rec_name       = TSstrdup("proxy.config.cop.core_signal");
+  ele2->rec_type       = TS_REC_INT;
+  ele2->valueT.int_val = -4;
 
-  ele3                 = TSRecordEleCreate(); // undefined action
-  ele3->rec_name       = TSstrdup("proxy.config.cop.core_signal");
+  ele3                 = TSRecordEleCreate(); // restart TM
+  ele3->rec_name       = (char *)TSstrdup("proxy.local.cluster.type");
   ele3->rec_type       = TS_REC_INT;
-  ele3->valueT.int_val = -4;
+  ele3->valueT.int_val = 2;
 
-  ele4                 = TSRecordEleCreate(); // restart TM
-  ele4->rec_name       = (char *)TSstrdup("proxy.local.cluster.type");
+  ele4                 = TSRecordEleCreate(); // reread action
+  ele4->rec_name       = (char *)TSstrdup("proxy.config.cluster.mc_ttl");
   ele4->rec_type       = TS_REC_INT;
-  ele4->valueT.int_val = 2;
-
-  ele5                 = TSRecordEleCreate(); // reread action
-  ele5->rec_name       = (char *)TSstrdup("proxy.config.cluster.mc_ttl");
-  ele5->rec_type       = TS_REC_INT;
-  ele5->valueT.int_val = 555;
+  ele4->valueT.int_val = 555;
 
   TSListEnqueue(list, ele4);
   TSListEnqueue(list, ele1);
   TSListEnqueue(list, ele2);
   TSListEnqueue(list, ele3);
-  TSListEnqueue(list, ele5);
 
   err = TSRecordSetMlt(list, &action);
   print_err("TSRecordSetMlt", err);
@@ -2267,12 +2211,6 @@ sync_test()
   printf("[TSRecordSetInt] proxy.config.cluster.cluster_port\n\tAction Should: [%d]\n\tAction
is    : [%d]\n", TS_ACTION_RESTART,
          action);
 
-  if (TSRecordSet("proxy.config.http.cache.fuzz.probability", "-0.3333", &action) !=
TS_ERR_OKAY) {
-    printf("TSRecordSet FAILED!\n");
-  } else {
-    printf("[TSRecordSet] proxy.config.http.cache.fuzz.probability=-0.3333\n");
-  }
-
   TSMgmtError ret;
   if ((ret = TSProxyStateSet(TS_PROXY_OFF, TS_CACHE_CLEAR_NONE)) != TS_ERR_OKAY) {
     printf("[TSProxyStateSet] turn off FAILED\n");
diff --git a/plugins/experimental/ts_lua/ts_lua_http_config.c b/plugins/experimental/ts_lua/ts_lua_http_config.c
index cd8b26f..5917f35 100644
--- a/plugins/experimental/ts_lua/ts_lua_http_config.c
+++ b/plugins/experimental/ts_lua/ts_lua_http_config.c
@@ -72,13 +72,10 @@ typedef enum {
   TS_LUA_CONFIG_HTTP_POST_CONNECT_ATTEMPTS_TIMEOUT            = TS_CONFIG_HTTP_POST_CONNECT_ATTEMPTS_TIMEOUT,
   TS_LUA_CONFIG_HTTP_DOWN_SERVER_CACHE_TIME                   = TS_CONFIG_HTTP_DOWN_SERVER_CACHE_TIME,
   TS_LUA_CONFIG_HTTP_DOWN_SERVER_ABORT_THRESHOLD              = TS_CONFIG_HTTP_DOWN_SERVER_ABORT_THRESHOLD,
-  TS_LUA_CONFIG_HTTP_CACHE_FUZZ_TIME                          = TS_CONFIG_HTTP_CACHE_FUZZ_TIME,
-  TS_LUA_CONFIG_HTTP_CACHE_FUZZ_MIN_TIME                      = TS_CONFIG_HTTP_CACHE_FUZZ_MIN_TIME,
   TS_LUA_CONFIG_HTTP_DOC_IN_CACHE_SKIP_DNS                    = TS_CONFIG_HTTP_DOC_IN_CACHE_SKIP_DNS,
   TS_LUA_CONFIG_HTTP_BACKGROUND_FILL_ACTIVE_TIMEOUT           = TS_CONFIG_HTTP_BACKGROUND_FILL_ACTIVE_TIMEOUT,
   TS_LUA_CONFIG_HTTP_RESPONSE_SERVER_STR                      = TS_CONFIG_HTTP_RESPONSE_SERVER_STR,
   TS_LUA_CONFIG_HTTP_CACHE_HEURISTIC_LM_FACTOR                = TS_CONFIG_HTTP_CACHE_HEURISTIC_LM_FACTOR,
-  TS_LUA_CONFIG_HTTP_CACHE_FUZZ_PROBABILITY                   = TS_CONFIG_HTTP_CACHE_FUZZ_PROBABILITY,
   TS_LUA_CONFIG_HTTP_BACKGROUND_FILL_COMPLETED_THRESHOLD      = TS_CONFIG_HTTP_BACKGROUND_FILL_COMPLETED_THRESHOLD,
   TS_LUA_CONFIG_NET_SOCK_PACKET_MARK_OUT                      = TS_CONFIG_NET_SOCK_PACKET_MARK_OUT,
   TS_LUA_CONFIG_NET_SOCK_PACKET_TOS_OUT                       = TS_CONFIG_NET_SOCK_PACKET_TOS_OUT,
@@ -196,13 +193,10 @@ ts_lua_var_item ts_lua_http_config_vars[] = {
   TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_POST_CONNECT_ATTEMPTS_TIMEOUT),
   TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_DOWN_SERVER_CACHE_TIME),
   TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_DOWN_SERVER_ABORT_THRESHOLD),
-  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_FUZZ_TIME),
-  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_FUZZ_MIN_TIME),
   TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_DOC_IN_CACHE_SKIP_DNS),
   TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_BACKGROUND_FILL_ACTIVE_TIMEOUT),
   TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_RESPONSE_SERVER_STR),
   TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_HEURISTIC_LM_FACTOR),
-  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_FUZZ_PROBABILITY),
   TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_BACKGROUND_FILL_COMPLETED_THRESHOLD),
   TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_NET_SOCK_PACKET_MARK_OUT),
   TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_NET_SOCK_PACKET_TOS_OUT),
diff --git a/proxy/InkAPI.cc b/proxy/InkAPI.cc
index 6e343f3..0d7dc9f 100644
--- a/proxy/InkAPI.cc
+++ b/proxy/InkAPI.cc
@@ -7954,12 +7954,6 @@ _conf_to_memberp(TSOverridableConfigKey conf, OverridableHttpConfigParams
*overr
   case TS_CONFIG_HTTP_DOWN_SERVER_ABORT_THRESHOLD:
     ret = _memberp_to_generic(&overridableHttpConfig->client_abort_threshold, typep);
     break;
-  case TS_CONFIG_HTTP_CACHE_FUZZ_TIME:
-    ret = _memberp_to_generic(&overridableHttpConfig->freshness_fuzz_time, typep);
-    break;
-  case TS_CONFIG_HTTP_CACHE_FUZZ_MIN_TIME:
-    ret = _memberp_to_generic(&overridableHttpConfig->freshness_fuzz_min_time, typep);
-    break;
   case TS_CONFIG_HTTP_DOC_IN_CACHE_SKIP_DNS:
     ret = _memberp_to_generic(&overridableHttpConfig->doc_in_cache_skip_dns, typep);
     break;
@@ -7972,9 +7966,6 @@ _conf_to_memberp(TSOverridableConfigKey conf, OverridableHttpConfigParams
*overr
   case TS_CONFIG_HTTP_CACHE_HEURISTIC_LM_FACTOR:
     ret = _memberp_to_generic(&overridableHttpConfig->cache_heuristic_lm_factor, typep);
     break;
-  case TS_CONFIG_HTTP_CACHE_FUZZ_PROBABILITY:
-    ret = _memberp_to_generic(&overridableHttpConfig->freshness_fuzz_prob, typep);
-    break;
   case TS_CONFIG_HTTP_BACKGROUND_FILL_COMPLETED_THRESHOLD:
     ret = _memberp_to_generic(&overridableHttpConfig->background_fill_threshold, typep);
     break;
@@ -8361,9 +8352,7 @@ TSHttpTxnConfigFind(const char *name, int length, TSOverridableConfigKey
*conf,
     break;
 
   case 33:
-    if (!strncmp(name, "proxy.config.http.cache.fuzz.time", length)) {
-      cnf = TS_CONFIG_HTTP_CACHE_FUZZ_TIME;
-    } else if (!strncmp(name, "proxy.config.ssl.client.cert.path", length)) {
+    if (!strncmp(name, "proxy.config.ssl.client.cert.path", length)) {
       cnf = TS_CONFIG_SSL_CERT_FILEPATH;
       typ = TS_RECORDDATATYPE_STRING;
     }
@@ -8424,8 +8413,6 @@ TSHttpTxnConfigFind(const char *name, int length, TSOverridableConfigKey
*conf,
     case 'e':
       if (!strncmp(name, "proxy.config.http.cache.max_stale_age", length)) {
         cnf = TS_CONFIG_HTTP_CACHE_MAX_STALE_AGE;
-      } else if (!strncmp(name, "proxy.config.http.cache.fuzz.min_time", length)) {
-        cnf = TS_CONFIG_HTTP_CACHE_FUZZ_MIN_TIME;
       } else if (!strncmp(name, "proxy.config.http.default_buffer_size", length)) {
         cnf = TS_CONFIG_HTTP_DEFAULT_BUFFER_SIZE;
       } else if (!strncmp(name, "proxy.config.ssl.client.cert.filename", length)) {
@@ -8537,12 +8524,6 @@ TSHttpTxnConfigFind(const char *name, int length, TSOverridableConfigKey
*conf,
         cnf = TS_CONFIG_HTTP_KEEP_ALIVE_ENABLED_OUT;
       }
       break;
-    case 'y':
-      if (!strncmp(name, "proxy.config.http.cache.fuzz.probability", length)) {
-        typ = TS_RECORDDATATYPE_FLOAT;
-        cnf = TS_CONFIG_HTTP_CACHE_FUZZ_PROBABILITY;
-      }
-      break;
     }
     break;
 
diff --git a/proxy/InkAPITest.cc b/proxy/InkAPITest.cc
index 857a176..25770aa 100644
--- a/proxy/InkAPITest.cc
+++ b/proxy/InkAPITest.cc
@@ -7571,13 +7571,10 @@ const char *SDK_Overridable_Configs[TS_CONFIG_LAST_ENTRY] = {
   "proxy.config.http.post_connect_attempts_timeout",
   "proxy.config.http.down_server.cache_time",
   "proxy.config.http.down_server.abort_threshold",
-  "proxy.config.http.cache.fuzz.time",
-  "proxy.config.http.cache.fuzz.min_time",
   "proxy.config.http.doc_in_cache_skip_dns",
   "proxy.config.http.background_fill_active_timeout",
   "proxy.config.http.response_server_str",
   "proxy.config.http.cache.heuristic_lm_factor",
-  "proxy.config.http.cache.fuzz.probability",
   "proxy.config.http.background_fill_completed_threshold",
   "proxy.config.net.sock_packet_mark_out",
   "proxy.config.net.sock_packet_tos_out",
diff --git a/proxy/http/HttpConfig.cc b/proxy/http/HttpConfig.cc
index 9f3e665..91779f2 100644
--- a/proxy/http/HttpConfig.cc
+++ b/proxy/http/HttpConfig.cc
@@ -1017,10 +1017,6 @@ HttpConfig::startup()
   HttpEstablishStaticConfigLongLong(c.oride.cache_max_stale_age, "proxy.config.http.cache.max_stale_age");
   HttpEstablishStaticConfigByte(c.oride.srv_enabled, "proxy.config.srv_enabled");
 
-  HttpEstablishStaticConfigLongLong(c.oride.freshness_fuzz_time, "proxy.config.http.cache.fuzz.time");
-  HttpEstablishStaticConfigLongLong(c.oride.freshness_fuzz_min_time, "proxy.config.http.cache.fuzz.min_time");
-  HttpEstablishStaticConfigFloat(c.oride.freshness_fuzz_prob, "proxy.config.http.cache.fuzz.probability");
-
   HttpEstablishStaticConfigStringAlloc(c.oride.cache_vary_default_text, "proxy.config.http.cache.vary_default_text");
   HttpEstablishStaticConfigStringAlloc(c.oride.cache_vary_default_images, "proxy.config.http.cache.vary_default_images");
   HttpEstablishStaticConfigStringAlloc(c.oride.cache_vary_default_other, "proxy.config.http.cache.vary_default_other");
@@ -1304,10 +1300,7 @@ HttpConfig::reconfigure()
   params->oride.cache_guaranteed_min_lifetime = m_master.oride.cache_guaranteed_min_lifetime;
   params->oride.cache_guaranteed_max_lifetime = m_master.oride.cache_guaranteed_max_lifetime;
 
-  params->oride.cache_max_stale_age     = m_master.oride.cache_max_stale_age;
-  params->oride.freshness_fuzz_time     = m_master.oride.freshness_fuzz_time;
-  params->oride.freshness_fuzz_min_time = m_master.oride.freshness_fuzz_min_time;
-  params->oride.freshness_fuzz_prob     = m_master.oride.freshness_fuzz_prob;
+  params->oride.cache_max_stale_age = m_master.oride.cache_max_stale_age;
 
   params->oride.cache_vary_default_text   = ats_strdup(m_master.oride.cache_vary_default_text);
   params->oride.cache_vary_default_images = ats_strdup(m_master.oride.cache_vary_default_images);
diff --git a/proxy/http/HttpConfig.h b/proxy/http/HttpConfig.h
index f2169a1..2593f80 100644
--- a/proxy/http/HttpConfig.h
+++ b/proxy/http/HttpConfig.h
@@ -455,8 +455,6 @@ struct OverridableHttpConfigParams {
       parent_connect_attempts(4),
       down_server_timeout(300),
       client_abort_threshold(10),
-      freshness_fuzz_time(240),
-      freshness_fuzz_min_time(0),
       max_cache_open_read_retries(-1),
       cache_open_read_retry_time(10),
       cache_generation_number(-1),
@@ -475,7 +473,6 @@ struct OverridableHttpConfigParams {
       global_user_agent_header(NULL),
       global_user_agent_header_size(0),
       cache_heuristic_lm_factor(0.10),
-      freshness_fuzz_prob(0.005),
       background_fill_threshold(0.5),
       client_cert_filename(NULL),
       client_cert_filepath(NULL),
@@ -665,9 +662,6 @@ struct OverridableHttpConfigParams {
   MgmtInt down_server_timeout;
   MgmtInt client_abort_threshold;
 
-  MgmtInt freshness_fuzz_time;
-  MgmtInt freshness_fuzz_min_time;
-
   // open read failure retries.
   MgmtInt max_cache_open_read_retries;
   MgmtInt cache_open_read_retry_time; // time is in mseconds
@@ -701,7 +695,6 @@ struct OverridableHttpConfigParams {
   size_t global_user_agent_header_size; // Updated when user_agent is set.
 
   MgmtFloat cache_heuristic_lm_factor;
-  MgmtFloat freshness_fuzz_prob;
   MgmtFloat background_fill_threshold;
 
   // Various strings, good place for them here ...
diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc
index fbacb1f..baea421 100644
--- a/proxy/http/HttpTransact.cc
+++ b/proxy/http/HttpTransact.cc
@@ -7297,48 +7297,6 @@ HttpTransact::calculate_document_freshness_limit(State *s, HTTPHdr
*response, ti
   return (freshness_limit);
 }
 
-////////////////////////////////////////////////////////////////////////////////////
-//  int HttpTransact::calculate_freshness_fuzz()
-//
-//    This function trys to revents many, many simulatenous revalidations in
-//     reverse proxy situations.  Statistically introduce a fuzz factor that
-//     brings revalidation forward for a small percentage of the requests/
-//     The hope is that is that the document early by a selected few, and
-//     the headers are updated in the cache before the regualr freshness
-//     limit is actually reached
-////////////////////////////////////////////////////////////////////////////////////
-
-int
-HttpTransact::calculate_freshness_fuzz(State *s, int fresh_limit)
-{
-  static double LOG_YEAR     = log10((double)s->txn_conf->cache_guaranteed_max_lifetime);
-  const uint32_t granularity = 1000;
-  int result                 = 0;
-
-  uint32_t random_num = this_ethread()->generator.random();
-  uint32_t index      = random_num % granularity;
-  uint32_t range      = (uint32_t)(granularity * s->txn_conf->freshness_fuzz_prob);
-
-  if (index < range) {
-    if (s->txn_conf->freshness_fuzz_min_time > 0) {
-      // Complicated calculations to try to find a reasonable fuzz time between fuzz_min_time
and fuzz_time
-      int fresh_small = (int)rint((double)s->txn_conf->freshness_fuzz_min_time *
-                                  pow(2, min((double)fresh_limit / (double)s->txn_conf->freshness_fuzz_time,
-                                             sqrt((double)s->txn_conf->freshness_fuzz_time))));
-      int fresh_large = max((int)s->txn_conf->freshness_fuzz_min_time,
-                            (int)rint(s->txn_conf->freshness_fuzz_time *
-                                      log10((double)(fresh_limit - s->txn_conf->freshness_fuzz_min_time)
/ LOG_YEAR)));
-      result = min(fresh_small, fresh_large);
-      DebugTxn("http_match", "calculate_freshness_fuzz using min/max --- freshness fuzz =
%d", result);
-    } else {
-      result = s->txn_conf->freshness_fuzz_time;
-      DebugTxn("http_match", "calculate_freshness_fuzz --- freshness fuzz = %d", result);
-    }
-  }
-
-  return result;
-}
-
 //////////////////////////////////////////////////////////////////////////////
 //
 //
@@ -7404,14 +7362,6 @@ HttpTransact::what_is_document_freshness(State *s, HTTPHdr *client_request,
HTTP
   fresh_limit   = calculate_document_freshness_limit(s, cached_obj_response, response_date,
&heuristic);
   ink_assert(fresh_limit >= 0);
 
-  // Fuzz the freshness to prevent too many revalidates to popular
-  //  documents at the same time
-  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);
-  }
-
   current_age = HttpTransactHeaders::calculate_document_age(s->request_sent_time, s->response_received_time,
cached_obj_response,
                                                             response_date, s->current.now);
 

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

Mime
View raw message