You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by so...@apache.org on 2017/05/09 15:34:17 UTC
[trafficserver] branch master updated: Remove more clustering bits
This is an automated email from the ASF dual-hosted git repository.
sorber 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 18e847d Remove more clustering bits
18e847d is described below
commit 18e847d1408cb0a9bc9dff80d83266c7930f289b
Author: Phil Sorber <so...@apache.org>
AuthorDate: Mon May 8 14:30:38 2017 -0600
Remove more clustering bits
---
cmd/traffic_cop/Makefile.am | 1 -
cmd/traffic_ctl/server.cc | 26 ++-----
cmd/traffic_ctl/traffic_ctl.cc | 1 -
cmd/traffic_ctl/traffic_ctl.h | 1 -
cmd/traffic_manager/AddConfigFilesHere.cc | 3 -
cmd/traffic_manager/Makefile.am | 1 -
cmd/traffic_manager/traffic_manager.cc | 41 ++--------
cmd/traffic_via/traffic_via.cc | 1 -
configure.ac | 1 -
iocore/cache/Cache.cc | 29 +++----
iocore/cache/CachePages.cc | 5 +-
iocore/cache/CacheTest.cc | 64 ++++++++-------
iocore/cache/CacheVol.cc | 2 +-
iocore/cache/I_Cache.h | 41 +++++-----
mgmt/BaseManager.h | 1 -
mgmt/LocalManager.cc | 1 -
mgmt/ProcessManager.cc | 3 -
mgmt/RecordsConfig.cc | 87 ---------------------
mgmt/api/APITestCliRemote.cc | 63 ++-------------
mgmt/api/Makefile.am | 1 -
plugins/experimental/epic/epic.cc | 16 ----
plugins/experimental/memcache/tsmemcache.cc | 4 +-
proxy/CacheControl.cc | 36 +--------
proxy/CacheControl.h | 6 --
proxy/ICP.cc | 4 +-
proxy/InkAPI.cc | 8 +-
proxy/TestClusterHash.cc | 117 ----------------------------
proxy/http/HttpCacheSM.cc | 5 +-
proxy/http/HttpConfig.cc | 27 -------
proxy/http/HttpConfig.h | 8 --
proxy/http/HttpSM.cc | 8 +-
proxy/http/HttpTransact.cc | 34 ++------
proxy/http/HttpTransact.h | 3 +-
proxy/http/HttpTransactCache.cc | 2 +-
34 files changed, 106 insertions(+), 545 deletions(-)
diff --git a/cmd/traffic_cop/Makefile.am b/cmd/traffic_cop/Makefile.am
index 4a56a31..e1f4c89 100644
--- a/cmd/traffic_cop/Makefile.am
+++ b/cmd/traffic_cop/Makefile.am
@@ -21,7 +21,6 @@ AM_CPPFLAGS += $(iocore_include_dirs) \
-I$(abs_top_srcdir)/lib \
-I$(abs_top_srcdir)/lib/records \
-I$(abs_top_srcdir)/mgmt \
- -I$(abs_top_srcdir)/mgmt/cluster \
-I$(abs_top_srcdir)/mgmt/api/include
AM_LDFLAGS += \
diff --git a/cmd/traffic_ctl/server.cc b/cmd/traffic_ctl/server.cc
index 33f82ce..356af7f 100644
--- a/cmd/traffic_ctl/server.cc
+++ b/cmd/traffic_ctl/server.cc
@@ -27,10 +27,11 @@ static int drain = 0;
static int manager = 0;
static int
-restart(unsigned argc, const char **argv, unsigned flags)
+restart(unsigned argc, const char **argv)
{
TSMgmtError error;
- const char *usage = (flags & TS_RESTART_OPT_CLUSTER) ? "cluster restart [OPTIONS]" : "server restart [OPTIONS]";
+ const char *usage = "server restart [OPTIONS]";
+ unsigned flags = TS_RESTART_OPT_NONE;
const ArgumentDescription opts[] = {
{"drain", '-', "Wait for client connections to drain before restarting", "F", &drain, nullptr, nullptr},
@@ -52,7 +53,7 @@ restart(unsigned argc, const char **argv, unsigned flags)
}
if (error != TS_ERR_OKAY) {
- CtrlMgmtError(error, "%s restart failed", (flags & TS_RESTART_OPT_CLUSTER) ? "cluster" : "server");
+ CtrlMgmtError(error, "server restart failed");
return CTRL_EX_ERROR;
}
@@ -60,15 +61,9 @@ restart(unsigned argc, const char **argv, unsigned flags)
}
static int
-cluster_restart(unsigned argc, const char **argv)
-{
- return restart(argc, argv, TS_RESTART_OPT_CLUSTER);
-}
-
-static int
server_restart(unsigned argc, const char **argv)
{
- return restart(argc, argv, TS_RESTART_OPT_NONE);
+ return restart(argc, argv);
}
static int
@@ -168,17 +163,6 @@ server_start(unsigned argc, const char **argv)
}
int
-subcommand_cluster(unsigned argc, const char **argv)
-{
- const subcommand commands[] = {
- {cluster_restart, "restart", "Restart the Traffic Server cluster"},
- {CtrlUnimplementedCommand, "status", "Show the cluster status"},
- };
-
- return CtrlGenericSubcommand("cluster", commands, countof(commands), argc, argv);
-}
-
-int
subcommand_server(unsigned argc, const char **argv)
{
const subcommand commands[] = {
diff --git a/cmd/traffic_ctl/traffic_ctl.cc b/cmd/traffic_ctl/traffic_ctl.cc
index c67c0f8..8cdadab 100644
--- a/cmd/traffic_ctl/traffic_ctl.cc
+++ b/cmd/traffic_ctl/traffic_ctl.cc
@@ -223,7 +223,6 @@ main(int argc, const char **argv)
const subcommand commands[] = {
{subcommand_alarm, "alarm", "Manipulate alarms"},
- {subcommand_cluster, "cluster", "Stop, restart and examine the cluster"},
{subcommand_config, "config", "Manipulate configuration records"},
{subcommand_metric, "metric", "Manipulate performance metrics"},
{subcommand_server, "server", "Stop, restart and examine the server"},
diff --git a/cmd/traffic_ctl/traffic_ctl.h b/cmd/traffic_ctl/traffic_ctl.h
index b3ef645..cc5c051 100644
--- a/cmd/traffic_ctl/traffic_ctl.h
+++ b/cmd/traffic_ctl/traffic_ctl.h
@@ -196,7 +196,6 @@ private:
};
int subcommand_alarm(unsigned argc, const char **argv);
-int subcommand_cluster(unsigned argc, const char **argv);
int subcommand_config(unsigned argc, const char **argv);
int subcommand_metric(unsigned argc, const char **argv);
int subcommand_server(unsigned argc, const char **argv);
diff --git a/cmd/traffic_manager/AddConfigFilesHere.cc b/cmd/traffic_manager/AddConfigFilesHere.cc
index fb13b42..35fddb0 100644
--- a/cmd/traffic_manager/AddConfigFilesHere.cc
+++ b/cmd/traffic_manager/AddConfigFilesHere.cc
@@ -61,9 +61,6 @@ initializeRegistry()
ink_assert(!"Configuration Object Registry Initialized More than Once");
}
- // NOTE: Logic that controls which files are not sync'd around the
- // cluster is located in ClusterCom::constructSharedFilePacket
-
configFiles->addFile("log_hosts.config", false);
configFiles->addFile("logging.config", false);
configFiles->addFile("storage.config", false);
diff --git a/cmd/traffic_manager/Makefile.am b/cmd/traffic_manager/Makefile.am
index d9c11ea..0aa4823 100644
--- a/cmd/traffic_manager/Makefile.am
+++ b/cmd/traffic_manager/Makefile.am
@@ -26,7 +26,6 @@ AM_CPPFLAGS += \
-I$(abs_top_srcdir)/mgmt \
-I$(abs_top_srcdir)/mgmt/api \
-I$(abs_top_srcdir)/mgmt/api/include \
- -I$(abs_top_srcdir)/mgmt/cluster \
-I$(abs_top_srcdir)/mgmt/utils \
-I$(abs_top_srcdir)/lib
diff --git a/cmd/traffic_manager/traffic_manager.cc b/cmd/traffic_manager/traffic_manager.cc
index 6e9d982..fa1c5ae 100644
--- a/cmd/traffic_manager/traffic_manager.cc
+++ b/cmd/traffic_manager/traffic_manager.cc
@@ -426,14 +426,13 @@ main(int argc, const char **argv)
// Set up the application version info
appVersionInfo.setup(PACKAGE_NAME, "traffic_manager", PACKAGE_VERSION, __DATE__, __TIME__, BUILD_MACHINE, BUILD_PERSON, "");
- bool found = false;
- int just_started = 0;
- int cluster_mcport = -1, cluster_rsport = -1;
+ bool found = false;
+ int just_started = 0;
// TODO: This seems completely incomplete, disabled for now
- // int dump_config = 0, dump_process = 0, dump_node = 0, dump_cluster = 0, dump_local = 0;
+ // int dump_config = 0, dump_process = 0, dump_node = 0, dump_local = 0;
char *proxy_port = nullptr;
int proxy_backdoor = -1;
- char *group_addr = nullptr, *tsArgs = nullptr;
+ char *tsArgs = nullptr;
int disable_syslog = false;
char userToRunAs[MAX_LOGIN + 1];
RecInt fds_throttle = -1;
@@ -445,9 +444,6 @@ main(int argc, const char **argv)
ArgumentDescription argument_descriptions[] = {
{"proxyOff", '-', "Disable proxy", "F", &proxy_off, nullptr, nullptr},
{"aconfPort", '-', "Autoconf port", "I", &aconf_port_arg, "MGMT_ACONF_PORT", nullptr},
- {"clusterMCPort", '-', "Cluster multicast port", "I", &cluster_mcport, "MGMT_CLUSTER_MC_PORT", nullptr},
- {"clusterRSPort", '-', "Cluster reliable service port", "I", &cluster_rsport, "MGMT_CLUSTER_RS_PORT", nullptr},
- {"groupAddr", '-', "Multicast group address", "S*", &group_addr, "MGMT_GROUP_ADDR", nullptr},
{"path", '-', "Path to the management socket", "S*", &mgmt_path, nullptr, nullptr},
{"recordsConf", '-', "Path to records.config", "S*", &recs_conf, nullptr, nullptr},
{"tsArgs", '-', "Additional arguments for traffic_server", "S*", &tsArgs, nullptr, nullptr},
@@ -630,30 +626,6 @@ main(int argc, const char **argv)
RecSetRecordInt("proxy.config.process_manager.mgmt_port", proxy_backdoor, REC_SOURCE_DEFAULT);
}
- if (cluster_rsport == -1) {
- cluster_rsport = REC_readInteger("proxy.config.cluster.rsport", &found);
- ink_assert(found);
- }
-
- if (cluster_mcport == -1) {
- cluster_mcport = REC_readInteger("proxy.config.cluster.mcport", &found);
- ink_assert(found);
- }
-
- if (!group_addr) {
- group_addr = REC_readString("proxy.config.cluster.mc_group_addr", &found);
- ink_assert(found);
- }
-
- in_addr_t min_ip = inet_network("224.0.0.255");
- in_addr_t max_ip = inet_network("239.255.255.255");
- in_addr_t group_addr_ip = inet_network(group_addr);
-
- if (!(min_ip < group_addr_ip && group_addr_ip < max_ip)) {
- mgmt_fatal(0, "[TrafficManager] Multi-Cast group addr '%s' is not in the permitted range of %s\n", group_addr,
- "224.0.1.0 - 239.255.255.255");
- }
-
lmgmt->initMgmtProcessServer(); /* Setup p-to-p process server */
lmgmt->listenForProxy();
@@ -927,10 +899,7 @@ SigChldHandler(int /* sig ATS_UNUSED */)
void
fileUpdated(char *fname, bool incVersion)
{
- if (strcmp(fname, "cluster.config") == 0) {
- lmgmt->signalFileChange("proxy.config.cluster.cluster_configuration");
-
- } else if (strcmp(fname, "remap.config") == 0) {
+ if (strcmp(fname, "remap.config") == 0) {
lmgmt->signalFileChange("proxy.config.url_remap.filename");
} else if (strcmp(fname, "socks.config") == 0) {
diff --git a/cmd/traffic_via/traffic_via.cc b/cmd/traffic_via/traffic_via.cc
index 4a82b73..e5c65ff 100644
--- a/cmd/traffic_via/traffic_via.cc
+++ b/cmd/traffic_via/traffic_via.cc
@@ -72,7 +72,6 @@ detailViaLookup(char flag)
// Cache type
viaTable = new VIA("Cache Type");
viaTable->viaData[(unsigned char)'C'] = "cache";
- viaTable->viaData[(unsigned char)'L'] = "cluster, (not used)";
viaTable->viaData[(unsigned char)'I'] = "icp";
viaTable->viaData[(unsigned char)'P'] = "parent";
viaTable->viaData[(unsigned char)'S'] = "server";
diff --git a/configure.ac b/configure.ac
index 3c27c3b..1d22bdb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1865,7 +1865,6 @@ iocore_include_dirs="\
-I\$(abs_top_srcdir)/iocore/aio \
-I\$(abs_top_srcdir)/iocore/hostdb \
-I\$(abs_top_srcdir)/iocore/cache \
--I\$(abs_top_srcdir)/iocore/cluster \
-I\$(abs_top_srcdir)/iocore/utils \
-I\$(abs_top_srcdir)/iocore/dns"
diff --git a/iocore/cache/Cache.cc b/iocore/cache/Cache.cc
index e5a9d58..f389bd3 100644
--- a/iocore/cache/Cache.cc
+++ b/iocore/cache/Cache.cc
@@ -1075,39 +1075,35 @@ CacheProcessor::db_check(bool afix)
}
Action *
-CacheProcessor::lookup(Continuation *cont, const CacheKey *key, bool cluster_cache_local ATS_UNUSED, bool local_only ATS_UNUSED,
- CacheFragType frag_type, const char *hostname, int host_len)
+CacheProcessor::lookup(Continuation *cont, const CacheKey *key, CacheFragType frag_type, const char *hostname, int host_len)
{
return caches[frag_type]->lookup(cont, key, frag_type, hostname, host_len);
}
inkcoreapi Action *
-CacheProcessor::open_read(Continuation *cont, const CacheKey *key, bool cluster_cache_local ATS_UNUSED, CacheFragType frag_type,
- const char *hostname, int hostlen)
+CacheProcessor::open_read(Continuation *cont, const CacheKey *key, CacheFragType frag_type, const char *hostname, int hostlen)
{
return caches[frag_type]->open_read(cont, key, frag_type, hostname, hostlen);
}
inkcoreapi Action *
-CacheProcessor::open_write(Continuation *cont, CacheKey *key, bool cluster_cache_local ATS_UNUSED, CacheFragType frag_type,
- int expected_size ATS_UNUSED, int options, time_t pin_in_cache, char *hostname, int host_len)
+CacheProcessor::open_write(Continuation *cont, CacheKey *key, CacheFragType frag_type, int expected_size ATS_UNUSED, int options,
+ time_t pin_in_cache, char *hostname, int host_len)
{
return caches[frag_type]->open_write(cont, key, frag_type, options, pin_in_cache, hostname, host_len);
}
Action *
-CacheProcessor::remove(Continuation *cont, const CacheKey *key, bool cluster_cache_local ATS_UNUSED, CacheFragType frag_type,
- const char *hostname, int host_len)
+CacheProcessor::remove(Continuation *cont, const CacheKey *key, CacheFragType frag_type, const char *hostname, int host_len)
{
Debug("cache_remove", "[CacheProcessor::remove] Issuing cache delete for %u", cache_hash(*key));
return caches[frag_type]->remove(cont, key, frag_type, hostname, host_len);
}
Action *
-CacheProcessor::lookup(Continuation *cont, const HttpCacheKey *key, bool cluster_cache_local, bool local_only,
- CacheFragType frag_type)
+CacheProcessor::lookup(Continuation *cont, const HttpCacheKey *key, CacheFragType frag_type)
{
- return lookup(cont, &key->hash, cluster_cache_local, local_only, frag_type, key->hostname, key->hostlen);
+ return lookup(cont, &key->hash, frag_type, key->hostname, key->hostlen);
}
Action *
@@ -3175,16 +3171,16 @@ ink_cache_init(ModuleVersion v)
//----------------------------------------------------------------------------
Action *
-CacheProcessor::open_read(Continuation *cont, const HttpCacheKey *key, bool cluster_cache_local, CacheHTTPHdr *request,
- OverridableHttpConfigParams *params, time_t pin_in_cache, CacheFragType type)
+CacheProcessor::open_read(Continuation *cont, const HttpCacheKey *key, CacheHTTPHdr *request, OverridableHttpConfigParams *params,
+ time_t pin_in_cache, CacheFragType type)
{
return caches[type]->open_read(cont, &key->hash, request, params, type, key->hostname, key->hostlen);
}
//----------------------------------------------------------------------------
Action *
-CacheProcessor::open_write(Continuation *cont, int expected_size, const HttpCacheKey *key, bool cluster_cache_local,
- CacheHTTPHdr *request, CacheHTTPInfo *old_info, time_t pin_in_cache, CacheFragType type)
+CacheProcessor::open_write(Continuation *cont, int expected_size, const HttpCacheKey *key, CacheHTTPHdr *request,
+ CacheHTTPInfo *old_info, time_t pin_in_cache, CacheFragType type)
{
return caches[type]->open_write(cont, &key->hash, old_info, pin_in_cache, nullptr /* key1 */, type, key->hostname, key->hostlen);
}
@@ -3193,9 +3189,8 @@ CacheProcessor::open_write(Continuation *cont, int expected_size, const HttpCach
// Note: this should not be called from from the cluster processor, or bad
// recursion could occur. This is merely a convenience wrapper.
Action *
-CacheProcessor::remove(Continuation *cont, const HttpCacheKey *key, bool cluster_cache_local, CacheFragType frag_type)
+CacheProcessor::remove(Continuation *cont, const HttpCacheKey *key, CacheFragType frag_type)
{
- // Remove from local cache only.
return caches[frag_type]->remove(cont, &key->hash, frag_type, key->hostname, key->hostlen);
}
diff --git a/iocore/cache/CachePages.cc b/iocore/cache/CachePages.cc
index ee26ebb..4644256 100644
--- a/iocore/cache/CachePages.cc
+++ b/iocore/cache/CachePages.cc
@@ -449,8 +449,7 @@ ShowCache::lookup_url(int event, Event *e)
Cache::generate_key(&key, &url, generation);
SET_HANDLER(&ShowCache::handleCacheEvent);
- Action *lookup_result =
- cacheProcessor.open_read(this, &key.hash, getClusterCacheLocal(&url), CACHE_FRAG_TYPE_HTTP, key.hostname, key.hostlen);
+ Action *lookup_result = cacheProcessor.open_read(this, &key.hash, CACHE_FRAG_TYPE_HTTP, key.hostname, key.hostlen);
if (!lookup_result)
lookup_result = ACTION_IO_ERROR;
if (lookup_result == ACTION_RESULT_DONE)
@@ -490,7 +489,7 @@ ShowCache::delete_url(int event, Event *e)
HttpCacheKey key;
Cache::generate_key(&key, &url); // XXX choose a cache generation number ...
- cacheProcessor.remove(this, &key, getClusterCacheLocal(&url), CACHE_FRAG_TYPE_HTTP);
+ cacheProcessor.remove(this, &key, CACHE_FRAG_TYPE_HTTP);
return EVENT_DONE;
}
diff --git a/iocore/cache/CacheTest.cc b/iocore/cache/CacheTest.cc
index 9c64219..a0e5073 100644
--- a/iocore/cache/CacheTest.cc
+++ b/iocore/cache/CacheTest.cc
@@ -305,73 +305,71 @@ EXCLUSIVE_REGRESSION_TEST(cache)(RegressionTest *t, int /* atype ATS_UNUSED */,
EThread *thread = this_ethread();
- CACHE_SM(t, write_test, { cacheProcessor.open_write(this, &key, false, CACHE_FRAG_TYPE_NONE, 100, CACHE_WRITE_OPT_SYNC); });
+ CACHE_SM(t, write_test, { cacheProcessor.open_write(this, &key, CACHE_FRAG_TYPE_NONE, 100, CACHE_WRITE_OPT_SYNC); });
write_test.expect_initial_event = CACHE_EVENT_OPEN_WRITE;
write_test.expect_event = VC_EVENT_WRITE_COMPLETE;
write_test.nbytes = 100;
rand_CacheKey(&write_test.key, thread->mutex);
- CACHE_SM(t, lookup_test, { cacheProcessor.lookup(this, &key, false); });
+ CACHE_SM(t, lookup_test, { cacheProcessor.lookup(this, &key); });
lookup_test.expect_event = CACHE_EVENT_LOOKUP;
lookup_test.key = write_test.key;
- CACHE_SM(t, read_test, { cacheProcessor.open_read(this, &key, false); });
+ CACHE_SM(t, read_test, { cacheProcessor.open_read(this, &key); });
read_test.expect_initial_event = CACHE_EVENT_OPEN_READ;
read_test.expect_event = VC_EVENT_READ_COMPLETE;
read_test.nbytes = 100;
read_test.key = write_test.key;
- CACHE_SM(t, remove_test, { cacheProcessor.remove(this, &key, false); });
+ CACHE_SM(t, remove_test, { cacheProcessor.remove(this, &key); });
remove_test.expect_event = CACHE_EVENT_REMOVE;
remove_test.key = write_test.key;
- CACHE_SM(t, lookup_fail_test, { cacheProcessor.lookup(this, &key, false); });
+ CACHE_SM(t, lookup_fail_test, { cacheProcessor.lookup(this, &key); });
lookup_fail_test.expect_event = CACHE_EVENT_LOOKUP_FAILED;
lookup_fail_test.key = write_test.key;
- CACHE_SM(t, read_fail_test, { cacheProcessor.open_read(this, &key, false); });
+ CACHE_SM(t, read_fail_test, { cacheProcessor.open_read(this, &key); });
read_fail_test.expect_event = CACHE_EVENT_OPEN_READ_FAILED;
read_fail_test.key = write_test.key;
- CACHE_SM(t, remove_fail_test, { cacheProcessor.remove(this, &key, false); });
+ CACHE_SM(t, remove_fail_test, { cacheProcessor.remove(this, &key); });
remove_fail_test.expect_event = CACHE_EVENT_REMOVE_FAILED;
rand_CacheKey(&remove_fail_test.key, thread->mutex);
- CACHE_SM(
- t, replace_write_test,
- { cacheProcessor.open_write(this, &key, false, CACHE_FRAG_TYPE_NONE, 100, CACHE_WRITE_OPT_SYNC); } int open_write_callout() {
- header.serial = 10;
- cache_vc->set_header(&header, sizeof(header));
- cvio = cache_vc->do_io_write(this, nbytes, buffer_reader);
- return 1;
- });
+ CACHE_SM(t, replace_write_test,
+ { cacheProcessor.open_write(this, &key, CACHE_FRAG_TYPE_NONE, 100, CACHE_WRITE_OPT_SYNC); } int open_write_callout() {
+ header.serial = 10;
+ cache_vc->set_header(&header, sizeof(header));
+ cvio = cache_vc->do_io_write(this, nbytes, buffer_reader);
+ return 1;
+ });
replace_write_test.expect_initial_event = CACHE_EVENT_OPEN_WRITE;
replace_write_test.expect_event = VC_EVENT_WRITE_COMPLETE;
replace_write_test.nbytes = 100;
rand_CacheKey(&replace_write_test.key, thread->mutex);
- CACHE_SM(t, replace_test,
- {
- cacheProcessor.open_write(this, &key, false, CACHE_FRAG_TYPE_NONE, 100, CACHE_WRITE_OPT_OVERWRITE_SYNC);
- } int open_write_callout() {
- CacheTestHeader *h = nullptr;
- int hlen = 0;
- if (cache_vc->get_header((void **)&h, &hlen) < 0)
- return -1;
- if (h->serial != 10)
- return -1;
- header.serial = 11;
- cache_vc->set_header(&header, sizeof(header));
- cvio = cache_vc->do_io_write(this, nbytes, buffer_reader);
- return 1;
- });
+ CACHE_SM(
+ t, replace_test,
+ { cacheProcessor.open_write(this, &key, CACHE_FRAG_TYPE_NONE, 100, CACHE_WRITE_OPT_OVERWRITE_SYNC); } int open_write_callout() {
+ CacheTestHeader *h = nullptr;
+ int hlen = 0;
+ if (cache_vc->get_header((void **)&h, &hlen) < 0)
+ return -1;
+ if (h->serial != 10)
+ return -1;
+ header.serial = 11;
+ cache_vc->set_header(&header, sizeof(header));
+ cvio = cache_vc->do_io_write(this, nbytes, buffer_reader);
+ return 1;
+ });
replace_test.expect_initial_event = CACHE_EVENT_OPEN_WRITE;
replace_test.expect_event = VC_EVENT_WRITE_COMPLETE;
replace_test.nbytes = 100;
replace_test.key = replace_write_test.key;
replace_test.content_salt = 1;
- CACHE_SM(t, replace_read_test, { cacheProcessor.open_read(this, &key, false); } int open_read_callout() {
+ CACHE_SM(t, replace_read_test, { cacheProcessor.open_read(this, &key); } int open_read_callout() {
CacheTestHeader *h = nullptr;
int hlen = 0;
if (cache_vc->get_header((void **)&h, &hlen) < 0)
@@ -387,13 +385,13 @@ EXCLUSIVE_REGRESSION_TEST(cache)(RegressionTest *t, int /* atype ATS_UNUSED */,
replace_read_test.key = replace_test.key;
replace_read_test.content_salt = 1;
- CACHE_SM(t, large_write_test, { cacheProcessor.open_write(this, &key, false, CACHE_FRAG_TYPE_NONE, 100, CACHE_WRITE_OPT_SYNC); });
+ CACHE_SM(t, large_write_test, { cacheProcessor.open_write(this, &key, CACHE_FRAG_TYPE_NONE, 100, CACHE_WRITE_OPT_SYNC); });
large_write_test.expect_initial_event = CACHE_EVENT_OPEN_WRITE;
large_write_test.expect_event = VC_EVENT_WRITE_COMPLETE;
large_write_test.nbytes = 10000000;
rand_CacheKey(&large_write_test.key, thread->mutex);
- CACHE_SM(t, pread_test, { cacheProcessor.open_read(this, &key, false); } int open_read_callout() {
+ CACHE_SM(t, pread_test, { cacheProcessor.open_read(this, &key); } int open_read_callout() {
cvio = cache_vc->do_io_pread(this, nbytes, buffer, 7000000);
return 1;
});
diff --git a/iocore/cache/CacheVol.cc b/iocore/cache/CacheVol.cc
index b1b7a4d..7dfb0ee 100644
--- a/iocore/cache/CacheVol.cc
+++ b/iocore/cache/CacheVol.cc
@@ -300,7 +300,7 @@ CacheVC::scanObject(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
ink_assert(hostinfo_copied);
SET_HANDLER(&CacheVC::scanRemoveDone);
// force remove even if there is a writer
- cacheProcessor.remove(this, &doc->first_key, true, CACHE_FRAG_TYPE_HTTP, hname, hlen);
+ cacheProcessor.remove(this, &doc->first_key, CACHE_FRAG_TYPE_HTTP, hname, hlen);
return EVENT_CONT;
} else {
offset = (char *)doc - buf->data();
diff --git a/iocore/cache/I_Cache.h b/iocore/cache/I_Cache.h
index ac140a4..2ed8dca 100644
--- a/iocore/cache/I_Cache.h
+++ b/iocore/cache/I_Cache.h
@@ -78,31 +78,28 @@ struct CacheProcessor : public Processor {
int dir_check(bool fix);
int db_check(bool fix);
- inkcoreapi Action *lookup(Continuation *cont, const CacheKey *key, bool cluster_cache_local, bool local_only = false,
- CacheFragType frag_type = CACHE_FRAG_TYPE_NONE, const char *hostname = 0, int host_len = 0);
- inkcoreapi Action *open_read(Continuation *cont, const CacheKey *key, bool cluster_cache_local,
- CacheFragType frag_type = CACHE_FRAG_TYPE_NONE, const char *hostname = 0, int host_len = 0);
- inkcoreapi Action *open_write(Continuation *cont, CacheKey *key, bool cluster_cache_local,
- CacheFragType frag_type = CACHE_FRAG_TYPE_NONE, int expected_size = CACHE_EXPECTED_SIZE,
- int options = 0, time_t pin_in_cache = (time_t)0, char *hostname = 0, int host_len = 0);
- inkcoreapi Action *remove(Continuation *cont, const CacheKey *key, bool cluster_cache_local,
- CacheFragType frag_type = CACHE_FRAG_TYPE_NONE, const char *hostname = 0, int host_len = 0);
+ inkcoreapi Action *lookup(Continuation *cont, const CacheKey *key, CacheFragType frag_type = CACHE_FRAG_TYPE_NONE,
+ const char *hostname = 0, int host_len = 0);
+ inkcoreapi Action *open_read(Continuation *cont, const CacheKey *key, CacheFragType frag_type = CACHE_FRAG_TYPE_NONE,
+ const char *hostname = 0, int host_len = 0);
+ inkcoreapi Action *open_write(Continuation *cont, CacheKey *key, CacheFragType frag_type = CACHE_FRAG_TYPE_NONE,
+ int expected_size = CACHE_EXPECTED_SIZE, int options = 0, time_t pin_in_cache = (time_t)0,
+ char *hostname = 0, int host_len = 0);
+ inkcoreapi Action *remove(Continuation *cont, const CacheKey *key, CacheFragType frag_type = CACHE_FRAG_TYPE_NONE,
+ const char *hostname = 0, int host_len = 0);
Action *scan(Continuation *cont, char *hostname = 0, int host_len = 0, int KB_per_second = SCAN_KB_PER_SECOND);
- Action *lookup(Continuation *cont, const HttpCacheKey *key, bool cluster_cache_local, bool local_only = false,
- CacheFragType frag_type = CACHE_FRAG_TYPE_HTTP);
- inkcoreapi Action *open_read(Continuation *cont, const HttpCacheKey *key, bool cluster_cache_local, CacheHTTPHdr *request,
+ Action *lookup(Continuation *cont, const HttpCacheKey *key, CacheFragType frag_type = CACHE_FRAG_TYPE_HTTP);
+ inkcoreapi Action *open_read(Continuation *cont, const HttpCacheKey *key, CacheHTTPHdr *request,
OverridableHttpConfigParams *params, time_t pin_in_cache = (time_t)0,
CacheFragType frag_type = CACHE_FRAG_TYPE_HTTP);
- Action *open_write(Continuation *cont, int expected_size, const HttpCacheKey *key, bool cluster_cache_local,
- CacheHTTPHdr *request, CacheHTTPInfo *old_info, time_t pin_in_cache = (time_t)0,
- CacheFragType frag_type = CACHE_FRAG_TYPE_HTTP);
- Action *remove(Continuation *cont, const HttpCacheKey *key, bool cluster_cache_local,
- CacheFragType frag_type = CACHE_FRAG_TYPE_HTTP);
- Action *link(Continuation *cont, CacheKey *from, CacheKey *to, bool cluster_cache_local,
- CacheFragType frag_type = CACHE_FRAG_TYPE_HTTP, char *hostname = 0, int host_len = 0);
-
- Action *deref(Continuation *cont, CacheKey *key, bool cluster_cache_local, CacheFragType frag_type = CACHE_FRAG_TYPE_HTTP,
- char *hostname = 0, int host_len = 0);
+ Action *open_write(Continuation *cont, int expected_size, const HttpCacheKey *key, CacheHTTPHdr *request, CacheHTTPInfo *old_info,
+ time_t pin_in_cache = (time_t)0, CacheFragType frag_type = CACHE_FRAG_TYPE_HTTP);
+ Action *remove(Continuation *cont, const HttpCacheKey *key, CacheFragType frag_type = CACHE_FRAG_TYPE_HTTP);
+ Action *link(Continuation *cont, CacheKey *from, CacheKey *to, CacheFragType frag_type = CACHE_FRAG_TYPE_HTTP, char *hostname = 0,
+ int host_len = 0);
+
+ Action *deref(Continuation *cont, CacheKey *key, CacheFragType frag_type = CACHE_FRAG_TYPE_HTTP, char *hostname = 0,
+ int host_len = 0);
/** Mark physical disk/device/file as offline.
All stripes for this device are disabled.
diff --git a/mgmt/BaseManager.h b/mgmt/BaseManager.h
index 37f8c6b..3d7471c 100644
--- a/mgmt/BaseManager.h
+++ b/mgmt/BaseManager.h
@@ -61,7 +61,6 @@
#define MGMT_EVENT_CLEAR_STATS 10004
#define MGMT_EVENT_CONFIG_FILE_UPDATE 10005
#define MGMT_EVENT_PLUGIN_CONFIG_UPDATE 10006
-#define MGMT_EVENT_HTTP_CLUSTER_DELTA 10007
#define MGMT_EVENT_ROLL_LOG_FILES 10008
#define MGMT_EVENT_LIBRECORDS 10009
#define MGMT_EVENT_CONFIG_FILE_UPDATE_NO_INC_VERSION 10010
diff --git a/mgmt/LocalManager.cc b/mgmt/LocalManager.cc
index a45e778..2a89fac 100644
--- a/mgmt/LocalManager.cc
+++ b/mgmt/LocalManager.cc
@@ -610,7 +610,6 @@ LocalManager::sendMgmtMsgToProcesses(MgmtMessageHdr *mh)
}
ink_assert(found);
if (!(configFiles && configFiles->getRollbackObj(fname, &rb)) &&
- (strcmp(data_raw, "proxy.config.cluster.cluster_configuration") != 0) &&
(strcmp(data_raw, "proxy.config.body_factory.template_sets_dir") != 0)) {
mgmt_fatal(0, "[LocalManager::sendMgmtMsgToProcesses] "
"Invalid 'data_raw' for MGMT_EVENT_CONFIG_FILE_UPDATE\n");
diff --git a/mgmt/ProcessManager.cc b/mgmt/ProcessManager.cc
index 2fabf7d..091bc70 100644
--- a/mgmt/ProcessManager.cc
+++ b/mgmt/ProcessManager.cc
@@ -294,9 +294,6 @@ ProcessManager::handleMgmtMsgFromLM(MgmtMessageHdr *mh)
this->cbtable->invoke(data_raw);
}
break;
- case MGMT_EVENT_HTTP_CLUSTER_DELTA:
- signalMgmtEntity(MGMT_EVENT_HTTP_CLUSTER_DELTA, data_raw);
- break;
case MGMT_EVENT_CONFIG_FILE_UPDATE:
case MGMT_EVENT_CONFIG_FILE_UPDATE_NO_INC_VERSION:
/*
diff --git a/mgmt/RecordsConfig.cc b/mgmt/RecordsConfig.cc
index d8feca2..7e151a1 100644
--- a/mgmt/RecordsConfig.cc
+++ b/mgmt/RecordsConfig.cc
@@ -247,30 +247,6 @@ static const RecordElement RecordsConfig[] =
,
{RECT_CONFIG, "proxy.config.lm.pserver_timeout_msecs", RECD_INT, "0", RECU_RESTART_TM, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
,
- {RECT_CONFIG, "proxy.config.cluster.delta_thresh", RECD_INT, "30", RECU_RESTART_TM, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
- ,
- {RECT_CONFIG, "proxy.config.cluster.peer_timeout", RECD_INT, "30", RECU_RESTART_TM, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
- ,
- {RECT_CONFIG, "proxy.config.cluster.mc_send_interval", RECD_INT, "2", RECU_RESTART_TM, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
- ,
- {RECT_CONFIG, "proxy.config.cluster.mc_poll_timeout", RECD_INT, "5", RECU_RESTART_TM, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
- ,
- {RECT_CONFIG, "proxy.config.cluster.startup_timeout", RECD_INT, "10", RECU_RESTART_TM, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
- ,
- //# cluster type requires restart to change
- //# 1 is full clustering, 2 is mgmt only, 3 is no clustering
- {RECT_LOCAL, "proxy.local.cluster.type", RECD_INT, "3", RECU_RESTART_TM, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
- ,
- {RECT_CONFIG, "proxy.config.cluster.rsport", RECD_INT, "8088", RECU_NULL, RR_REQUIRED, RECC_NULL, nullptr, RECA_NULL}
- ,
- {RECT_CONFIG, "proxy.config.cluster.mcport", RECD_INT, "8089", RECU_DYNAMIC, RR_REQUIRED, RECC_NULL, nullptr, RECA_NULL}
- ,
- {RECT_CONFIG, "proxy.config.cluster.mc_group_addr", RECD_STRING, "224.0.1.37", RECU_DYNAMIC, RR_REQUIRED, RECC_IP, R"([0-255]\.[0-255]\.[0-255]\.[0-255])", RECA_NULL}
- ,
- {RECT_CONFIG, "proxy.config.cluster.mc_ttl", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
- ,
- {RECT_CONFIG, "proxy.config.cluster.log_bogus_mc_msgs", RECD_INT, "1", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
- ,
{RECT_CONFIG, "proxy.config.admin.synthetic_port", RECD_INT, "8083", RECU_RESTART_TM, RR_REQUIRED, RECC_INT, "[0-65535]", RECA_NULL}
,
{RECT_CONFIG, "proxy.config.admin.autoconf.localhost_only", RECD_INT, "1", RECU_RESTART_TM, RR_NULL, RECC_INT, "[0-1]", RECA_NULL}
@@ -640,8 +616,6 @@ static const RecordElement RecordsConfig[] =
// that the response has a Content-Length: header, with a value of "0".
{RECT_CONFIG, "proxy.config.http.cache.allow_empty_doc", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, "[0-1]", RECA_NULL }
,
- {RECT_CONFIG, "proxy.config.http.cache.cluster_cache_local", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_INT, "[0-1]", RECA_NULL}
- ,
{RECT_CONFIG, "proxy.config.http.cache.ignore_client_no_cache", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_INT, "[0-1]", RECA_NULL}
,
{RECT_CONFIG, "proxy.config.http.cache.ignore_client_cc_max_age", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_INT, "[0-1]", RECA_NULL}
@@ -868,61 +842,6 @@ static const RecordElement RecordsConfig[] =
//##############################################################################
//#
- //# Cluster Subsystem
- //#
- //##############################################################################
- {RECT_CONFIG, "proxy.config.cluster.threads", RECD_INT, "1", RECU_RESTART_TS, RR_NULL, RECC_INT, "[0-512]", RECA_NULL}
- ,
- {RECT_CONFIG, "proxy.config.cluster.cluster_port", RECD_INT, "8086", RECU_RESTART_TS, RR_REQUIRED, RECC_NULL, nullptr, RECA_NULL}
- ,
- {RECT_CONFIG, "proxy.config.cluster.cluster_configuration", RECD_STRING, "cluster.config", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
- ,
- {RECT_CONFIG, "proxy.config.cluster.ethernet_interface", RECD_STRING, TS_BUILD_DEFAULT_LOOPBACK_IFACE, RECU_RESTART_TS, RR_REQUIRED, RECC_STR, "^[^[:space:]]*$", RECA_NULL}
- ,
- {RECT_CONFIG, "proxy.config.cluster.enable_monitor", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
- ,
- {RECT_CONFIG, "proxy.config.cluster.monitor_interval_secs", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
- ,
- {RECT_CONFIG, "proxy.config.cluster.send_buffer_size", RECD_INT, "10485760", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
- ,
- {RECT_CONFIG, "proxy.config.cluster.receive_buffer_size", RECD_INT, "10485760", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
- ,
- {RECT_CONFIG, "proxy.config.cluster.sock_option_flag", RECD_INT, "0x0", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
- ,
- {RECT_CONFIG, "proxy.config.cluster.sock_packet_mark", RECD_INT, "0x0", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
- ,
- {RECT_CONFIG, "proxy.config.cluster.sock_packet_tos", RECD_INT, "0x0", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
- ,
- {RECT_CONFIG, "proxy.config.cluster.rpc_cache_cluster", RECD_INT, "0", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
- ,
-
- //##################################################################
- //# Cluster interconnect load monitoring configuration options.
- //# Internal use only
- //##################################################################
- //# load monitor_enabled: -1 = compute only, 0 = disable, 1 = compute and act
- {RECT_CONFIG, "proxy.config.cluster.load_monitor_enabled", RECD_INT, "1", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
- ,
- {RECT_CONFIG, "proxy.config.cluster.ping_send_interval_msecs", RECD_INT, "100", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
- ,
- {RECT_CONFIG, "proxy.config.cluster.ping_response_buckets", RECD_INT, "100", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
- ,
- {RECT_CONFIG, "proxy.config.cluster.msecs_per_ping_response_bucket", RECD_INT, "50", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
- ,
- {RECT_CONFIG, "proxy.config.cluster.ping_latency_threshold_msecs", RECD_INT, "500", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
- ,
- {RECT_CONFIG, "proxy.config.cluster.load_compute_interval_msecs", RECD_INT, "5000", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
- ,
- {RECT_CONFIG, "proxy.config.cluster.periodic_timer_interval_msecs", RECD_INT, "100", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
- ,
- {RECT_CONFIG, "proxy.config.cluster.ping_history_buf_length", RECD_INT, "120", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
- ,
- {RECT_CONFIG, "proxy.config.cluster.cluster_load_clear_duration", RECD_INT, "24", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
- ,
- {RECT_CONFIG, "proxy.config.cluster.cluster_load_exceed_duration", RECD_INT, "4", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
- ,
- //##############################################################################
- //#
//# Hit Evacuation
//#
//##############################################################################
@@ -1075,12 +994,6 @@ static const RecordElement RecordsConfig[] =
// # move entries to the owner on a lookup?
{RECT_CONFIG, "proxy.config.hostdb.migrate_on_demand", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
,
- // # find DNS results on another node in the cluster?
- {RECT_CONFIG, "proxy.config.hostdb.cluster", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
- ,
- // # find DNS results for round-robin hosts on another node in the cluster?
- {RECT_CONFIG, "proxy.config.hostdb.cluster.round_robin", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
- ,
// # round-robin addresses for single clients
// # (can cause authentication problems)
{RECT_CONFIG, "proxy.config.hostdb.strict_round_robin", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
diff --git a/mgmt/api/APITestCliRemote.cc b/mgmt/api/APITestCliRemote.cc
index 40e8fe3..fae19ed 100644
--- a/mgmt/api/APITestCliRemote.cc
+++ b/mgmt/api/APITestCliRemote.cc
@@ -87,7 +87,7 @@
*
* Statistics
* ----------
- * set_stats - sets dummy values for selected group of NODE, CLUSTER, PROCESS
+ * set_stats - sets dummy values for selected group of NODE, PROCESS
* records
* print_stats - prints the values for the same selected group of records
* reset_stats - resets all statistics to default values
@@ -408,9 +408,6 @@ print_cache_ele(TSCacheEle *ele)
case TS_CACHE_IGNORE_NO_CACHE:
snprintf(buf + buf_pos, sizeof(buf) - buf_pos, "action=ignore-no-cache");
break;
- case TS_CACHE_CLUSTER_CACHE_LOCAL:
- snprintf(buf + buf_pos, sizeof(buf) - buf_pos, "action=cluster-cache-local");
- break;
case TS_CACHE_IGNORE_CLIENT_NO_CACHE:
snprintf(buf + buf_pos, sizeof(buf) - buf_pos, "action=ignore-server-no-cache");
break;
@@ -905,13 +902,13 @@ stop_TS()
print_err("stop_TS", ret);
}
-// restarts Traffic Manager cluster wide (Traffic Cop must be running)
+// restarts Traffic Manager (Traffic Cop must be running)
void
restart()
{
TSMgmtError ret;
- printf("RESTART - Cluster wide\n");
+ printf("RESTART\n");
if ((ret = TSRestart(true)) != TS_ERR_OKAY) {
printf("[TSRestart] FAILED\n");
}
@@ -947,11 +944,6 @@ test_action_need()
TSRecordSetString("proxy.config.proxy_name", "proxy_dorky", &action);
printf("[TSRecordSetString] proxy.config.proxy_name \n\tAction Should: [%d]\n\tAction is : [%d]\n", TS_ACTION_UNDEFINED,
action);
-
- // RU_RESTART_TS record
- TSRecordSetInt("proxy.config.cluster.cluster_port", 6666, &action);
- printf("[TSRecordSetInt] proxy.config.cluster.cluster_port\n\tAction Should: [%d]\n\tAction is : [%d]\n", TS_ACTION_RESTART,
- action);
}
/* Bouncer the traffic_server process(es) */
@@ -960,7 +952,7 @@ bounce()
{
TSMgmtError ret;
- printf("BOUNCER - Cluster wide\n");
+ printf("BOUNCER\n");
if ((ret = TSBounce(true)) != TS_ERR_OKAY) {
printf("[TSBounce] FAILED\n");
}
@@ -1276,7 +1268,7 @@ void
test_record_set_mlt()
{
TSList list;
- TSRecordEle *ele1, *ele2, *ele3, *ele4;
+ TSRecordEle *ele1, *ele2;
TSActionNeedT action = TS_ACTION_UNDEFINED;
TSMgmtError err;
@@ -1292,20 +1284,8 @@ test_record_set_mlt()
ele2->rec_type = TS_REC_INT;
ele2->valueT.int_val = -4;
- ele3 = TSRecordEleCreate(); // restart TM
- ele3->rec_name = (char *)TSstrdup("proxy.local.cluster.type");
- ele3->rec_type = TS_REC_INT;
- ele3->valueT.int_val = 2;
-
- ele4 = TSRecordEleCreate(); // reread action
- ele4->rec_name = (char *)TSstrdup("proxy.config.cluster.mc_ttl");
- ele4->rec_type = TS_REC_INT;
- ele4->valueT.int_val = 555;
-
- TSListEnqueue(list, ele4);
TSListEnqueue(list, ele1);
TSListEnqueue(list, ele2);
- TSListEnqueue(list, ele3);
err = TSRecordSetMlt(list, &action);
print_err("TSRecordSetMlt", err);
@@ -2111,18 +2091,6 @@ set_stats()
TSRecordSetInt("proxy.node.proxy_running", 110, &action);
TSRecordSetInt("proxy.node.current_client_connections", 110, &action);
TSRecordSetInt("proxy.node.current_cache_connections", 110, &action);
-
- TSRecordSetFloat("proxy.cluster.user_agent_total_bytes_avg_10s", 110, &action);
- TSRecordSetFloat("proxy.cluster.origin_server_total_bytes_avg_10s", 110, &action);
- TSRecordSetFloat("proxy.cluster.bandwidth_hit_ratio", 110, &action);
- TSRecordSetFloat("proxy.cluster.bandwidth_hit_ratio_avg_10s", 110, &action);
- TSRecordSetFloat("proxy.cluster.cache_hit_ratio", 110, &action);
- TSRecordSetFloat("proxy.cluster.cache_hit_mem_ratio", 110, &action);
-
- TSRecordSetInt("proxy.cluster.cache_total_hits", 110, &action);
- TSRecordSetInt("proxy.cluster.cache_total_hits_mem", 110, &action);
- TSRecordSetInt("proxy.cluster.cache_total_misses", 110, &action);
- TSRecordSetInt("proxy.cluster.http.throughput", 110, &action);
}
void
@@ -2168,23 +2136,6 @@ print_stats()
"%" PRId64 ", %" PRId64 ", %" PRId64 ", %" PRId64 ", %" PRId64 ", %" PRId64 ", %" PRId64 ", %" PRId64 ", %" PRId64 "\n",
i1, i7, i2, i3, i4, i5, i6, i8, i9);
- TSRecordGetFloat("proxy.cluster.user_agent_total_bytes_avg_10s", &f1);
- TSRecordGetFloat("proxy.cluster.origin_server_total_bytes_avg_10s", &f2);
- TSRecordGetFloat("proxy.cluster.bandwidth_hit_ratio", &f3);
- TSRecordGetFloat("proxy.cluster.bandwidth_hit_ratio_avg_10s", &f4);
- TSRecordGetFloat("proxy.cluster.cache_hit_ratio", &f5);
- TSRecordGetFloat("proxy.cluster.cache_hit_mem_ratio", &f6);
-
- TSRecordGetInt("proxy.cluster.cache_total_hits", &i3);
- TSRecordGetInt("proxy.cluster.cache_total_hits_mem", &i7);
- TSRecordGetInt("proxy.cluster.cache_total_misses", &i4);
- TSRecordGetInt("proxy.cluster.http.throughput", &i5);
-
- fprintf(stderr, "CLUSTER stats: \n");
- fprintf(stderr, "%f, %f, %f, %f, %f, %f\n", f1, f2, f3, f4, f5, f6);
- fprintf(stderr, "%" PRId64 ", %" PRId64 ", %" PRId64 ", %" PRId64 ", %" PRId64 ", %" PRId64 ", %" PRId64 "\n", i1, i6, i2, i3, i7,
- i4, i5);
-
fprintf(stderr, "PROCESS stats: \n");
fprintf(stderr, "%f, %f\n", f1, f2);
fprintf(stderr, "%" PRId64 ", %" PRId64 ", %" PRId64 ", %" PRId64 "\n", i1, i2, i3, i4);
@@ -2207,10 +2158,6 @@ sync_test()
printf("[TSRecordSetString] proxy.config.proxy_name \n\tAction Should: [%d]\n\tAction is : [%d]\n", TS_ACTION_UNDEFINED,
action);
- TSRecordSetInt("proxy.config.cluster.cluster_port", 3333, &action);
- printf("[TSRecordSetInt] proxy.config.cluster.cluster_port\n\tAction Should: [%d]\n\tAction is : [%d]\n", TS_ACTION_RESTART,
- action);
-
TSMgmtError ret;
if ((ret = TSProxyStateSet(TS_PROXY_OFF, TS_CACHE_CLEAR_NONE)) != TS_ERR_OKAY) {
printf("[TSProxyStateSet] turn off FAILED\n");
diff --git a/mgmt/api/Makefile.am b/mgmt/api/Makefile.am
index 3bb3ff7..2e32dff 100644
--- a/mgmt/api/Makefile.am
+++ b/mgmt/api/Makefile.am
@@ -25,7 +25,6 @@ AM_CPPFLAGS += \
$(iocore_include_dirs) \
-I$(abs_top_srcdir)/lib/records \
-I$(abs_top_srcdir)/mgmt \
- -I$(abs_top_srcdir)/mgmt/cluster \
-I$(abs_top_srcdir)/mgmt/utils \
-I$(abs_top_srcdir)/mgmt/api/include \
-I$(abs_top_srcdir)/lib \
diff --git a/plugins/experimental/epic/epic.cc b/plugins/experimental/epic/epic.cc
index e455085..096c5f8 100644
--- a/plugins/experimental/epic/epic.cc
+++ b/plugins/experimental/epic/epic.cc
@@ -74,7 +74,6 @@ static const std::set<std::string> epic_gauges = {
"proxy.node.cache_total_misses_avg_10s",
"proxy.node.client_throughput_out",
"proxy.node.client_throughput_out_kbit",
- "proxy.node.cluster.nodes",
"proxy.node.config.reconfigure_required",
"proxy.node.config.reconfigure_time",
"proxy.node.config.restart_required.cop",
@@ -177,21 +176,6 @@ static const std::set<std::string> epic_gauges = {
"proxy.process.cache.update.active",
"proxy.process.cache.write.active",
"proxy.process.cache.write_per_sec",
- "proxy.process.cluster.cache_callback_time",
- "proxy.process.cluster.cache_outstanding",
- "proxy.process.cluster.cluster_ping_time",
- "proxy.process.cluster.connections_avg_time",
- "proxy.process.cluster.connections_open",
- "proxy.process.cluster.control_messages_avg_receive_time",
- "proxy.process.cluster.control_messages_avg_send_time",
- "proxy.process.cluster.lkrmt_cache_callback_time",
- "proxy.process.cluster.local_connection_time",
- "proxy.process.cluster.open_delay_time",
- "proxy.process.cluster.rdmsg_assemble_time",
- "proxy.process.cluster.remote_connection_time",
- "proxy.process.cluster.remote_op_reply_timeouts",
- "proxy.process.cluster.remote_op_timeouts",
- "proxy.process.cluster.rmt_cache_callback_time",
"proxy.process.dns.fail_avg_time",
"proxy.process.dns.in_flight",
"proxy.process.dns.lookup_avg_time",
diff --git a/plugins/experimental/memcache/tsmemcache.cc b/plugins/experimental/memcache/tsmemcache.cc
index 9268b02..e407b8e 100644
--- a/plugins/experimental/memcache/tsmemcache.cc
+++ b/plugins/experimental/memcache/tsmemcache.cc
@@ -470,7 +470,7 @@ MC::get_item()
{
TS_PUSH_HANDLER(&MC::cache_read_event);
MD5Context().hash_immediate(cache_key, (void *)key, (int)header.nkey);
- pending_action = cacheProcessor.open_read(this, &cache_key, true);
+ pending_action = cacheProcessor.open_read(this, &cache_key);
return EVENT_CONT;
}
@@ -478,7 +478,7 @@ int
MC::set_item()
{
MD5Context().hash_immediate(cache_key, (void *)key, (int)header.nkey);
- pending_action = cacheProcessor.open_write(this, &cache_key, true, CACHE_FRAG_TYPE_NONE, header.nbytes,
+ pending_action = cacheProcessor.open_write(this, &cache_key, CACHE_FRAG_TYPE_NONE, header.nbytes,
CACHE_WRITE_OPT_OVERWRITE | TSMEMCACHE_WRITE_SYNC);
return EVENT_CONT;
}
diff --git a/proxy/CacheControl.cc b/proxy/CacheControl.cc
index 237ce7a..cff81f9 100644
--- a/proxy/CacheControl.cc
+++ b/proxy/CacheControl.cc
@@ -51,7 +51,6 @@ static const char *CC_directive_str[CC_NUM_TYPES] = {
"NEVER_CACHE",
"STANDARD_CACHE",
"IGNORE_NO_CACHE",
- "CLUSTER_CACHE_LOCAL",
"IGNORE_CLIENT_NO_CACHE",
"IGNORE_SERVER_NO_CACHE",
"PIN_IN_CACHE",
@@ -164,10 +163,6 @@ getCacheControl(CacheControlResult *result, HttpRequestData *rdata, OverridableH
rdata->tag = tag;
CacheControlTable->Match(rdata, result);
- if (h_txn_conf->cache_cluster_cache_local) {
- result->cluster_cache_local = true;
- }
-
if (h_txn_conf->cache_ignore_client_no_cache) {
result->ignore_client_no_cache = true;
}
@@ -181,21 +176,6 @@ getCacheControl(CacheControlResult *result, HttpRequestData *rdata, OverridableH
}
}
-bool
-getClusterCacheLocal(URL *url)
-{
- HttpRequestData rdata;
- CacheControlResult result;
- HTTPHdr req_hdr;
-
- req_hdr.create(HTTP_TYPE_REQUEST, nullptr);
- req_hdr.url_set(url);
- rdata.hdr = &req_hdr;
- CacheControlTable->Match(&rdata, &result);
- req_hdr.clear();
- return result.cluster_cache_local;
-}
-
//
// End API functions
//
@@ -207,8 +187,8 @@ getClusterCacheLocal(URL *url)
void
CacheControlResult::Print()
{
- printf("\t reval: %d, never-cache: %d, pin: %d, cluster-cache-c: %d ignore-c: %d ignore-s: %d\n", revalidate_after, never_cache,
- pin_in_cache_for, cluster_cache_local, ignore_client_no_cache, ignore_server_no_cache);
+ printf("\t reval: %d, never-cache: %d, pin: %d, ignore-c: %d ignore-s: %d\n", revalidate_after, never_cache, pin_in_cache_for,
+ ignore_client_no_cache, ignore_server_no_cache);
}
// void CacheControlRecord::Print()
@@ -228,7 +208,6 @@ CacheControlRecord::Print()
case CC_TTL_IN_CACHE:
printf("\t\tDirective: %s : %d\n", CC_directive_str[CC_TTL_IN_CACHE], this->time_arg);
break;
- case CC_CLUSTER_CACHE_LOCAL:
case CC_IGNORE_CLIENT_NO_CACHE:
case CC_IGNORE_SERVER_NO_CACHE:
case CC_NEVER_CACHE:
@@ -313,10 +292,6 @@ CacheControlRecord::Init(matcher_line *line_info)
} else if (strcasecmp(val, "ignore-no-cache") == 0) {
directive = CC_IGNORE_NO_CACHE;
d_found = true;
- } else if (strcasecmp(val, "cluster-cache-local") == 0) {
- directive = CC_CLUSTER_CACHE_LOCAL;
- ;
- d_found = true;
} else if (strcasecmp(val, "ignore-client-no-cache") == 0) {
directive = CC_IGNORE_CLIENT_NO_CACHE;
d_found = true;
@@ -426,13 +401,6 @@ CacheControlRecord::UpdateMatch(CacheControlResult *result, RequestData *rdata)
match = true;
}
break;
- case CC_CLUSTER_CACHE_LOCAL:
- if (this->CheckForMatch(h_rdata, result->cluster_cache_local_line) == true) {
- result->cluster_cache_local = true;
- result->cluster_cache_local_line = this->line_num;
- match = true;
- }
- break;
case CC_PIN_IN_CACHE:
if (this->CheckForMatch(h_rdata, result->pin_line) == true) {
result->pin_in_cache_for = time_arg;
diff --git a/proxy/CacheControl.h b/proxy/CacheControl.h
index 6d598e1..2e4fff2 100644
--- a/proxy/CacheControl.h
+++ b/proxy/CacheControl.h
@@ -52,7 +52,6 @@ enum CacheControlType {
CC_NEVER_CACHE,
CC_STANDARD_CACHE,
CC_IGNORE_NO_CACHE,
- CC_CLUSTER_CACHE_LOCAL,
CC_IGNORE_CLIENT_NO_CACHE,
CC_IGNORE_SERVER_NO_CACHE,
CC_PIN_IN_CACHE,
@@ -76,7 +75,6 @@ public:
int pin_in_cache_for;
int ttl_in_cache;
bool never_cache;
- bool cluster_cache_local;
bool ignore_client_no_cache;
bool ignore_server_no_cache;
bool ignore_client_cc_max_age;
@@ -94,7 +92,6 @@ public:
int never_line;
int pin_line;
int ttl_line;
- int cluster_cache_local_line;
int ignore_client_line;
int ignore_server_line;
};
@@ -104,7 +101,6 @@ inline CacheControlResult::CacheControlResult()
pin_in_cache_for(CC_UNSET_TIME),
ttl_in_cache(CC_UNSET_TIME),
never_cache(false),
- cluster_cache_local(false),
ignore_client_no_cache(false),
ignore_server_no_cache(false),
ignore_client_cc_max_age(true),
@@ -113,7 +109,6 @@ inline CacheControlResult::CacheControlResult()
never_line(-1),
pin_line(-1),
ttl_line(-1),
- cluster_cache_local_line(-1),
ignore_client_line(-1),
ignore_server_line(-1)
{
@@ -144,7 +139,6 @@ struct OverridableHttpConfigParams;
inkcoreapi void getCacheControl(CacheControlResult *result, HttpRequestData *rdata, OverridableHttpConfigParams *h_txn_conf,
char *tag = NULL);
-inkcoreapi bool getClusterCacheLocal(URL *url);
inkcoreapi bool host_rule_in_CacheControlTable();
inkcoreapi bool ip_rule_in_CacheControlTable();
diff --git a/proxy/ICP.cc b/proxy/ICP.cc
index 04864b1..b75d7e4 100644
--- a/proxy/ICP.cc
+++ b/proxy/ICP.cc
@@ -475,9 +475,9 @@ ICPPeerReadCont::ICPPeerQueryCont(int /* event ATS_UNUSED */, Event * /* e ATS_U
//////////////////////////////////////////////////////////////
// ToDo: This is maybe not 100% correct, since this is not using the txnp (but the global overridable copy)
- a = cacheProcessor.open_read(this, &key, false, &gclient_request, &_http_config_params->oride, (time_t)0);
+ a = cacheProcessor.open_read(this, &key, &gclient_request, &_http_config_params->oride, (time_t)0);
} else {
- a = cacheProcessor.lookup(this, &key, false, _state->_cache_lookup_local);
+ a = cacheProcessor.lookup(this, &key);
}
if (!a) {
a = ACTION_IO_ERROR;
diff --git a/proxy/InkAPI.cc b/proxy/InkAPI.cc
index 3a24f04..86468f8 100644
--- a/proxy/InkAPI.cc
+++ b/proxy/InkAPI.cc
@@ -6901,7 +6901,7 @@ TSCacheRead(TSCont contp, TSCacheKey key)
CacheInfo *info = (CacheInfo *)key;
Continuation *i = (INKContInternal *)contp;
- return (TSAction)cacheProcessor.open_read(i, &info->cache_key, true, info->frag_type, info->hostname, info->len);
+ return (TSAction)cacheProcessor.open_read(i, &info->cache_key, info->frag_type, info->hostname, info->len);
}
TSAction
@@ -6915,8 +6915,8 @@ TSCacheWrite(TSCont contp, TSCacheKey key)
CacheInfo *info = (CacheInfo *)key;
Continuation *i = (INKContInternal *)contp;
- return (TSAction)cacheProcessor.open_write(i, &info->cache_key, true, info->frag_type, 0, false, info->pin_in_cache,
- info->hostname, info->len);
+ return (TSAction)cacheProcessor.open_write(i, &info->cache_key, info->frag_type, 0, false, info->pin_in_cache, info->hostname,
+ info->len);
}
TSAction
@@ -6930,7 +6930,7 @@ TSCacheRemove(TSCont contp, TSCacheKey key)
CacheInfo *info = (CacheInfo *)key;
INKContInternal *i = (INKContInternal *)contp;
- return (TSAction)cacheProcessor.remove(i, &info->cache_key, true, info->frag_type, info->hostname, info->len);
+ return (TSAction)cacheProcessor.remove(i, &info->cache_key, info->frag_type, info->hostname, info->len);
}
TSAction
diff --git a/proxy/TestClusterHash.cc b/proxy/TestClusterHash.cc
deleted file mode 100644
index 12cb9ac..0000000
--- a/proxy/TestClusterHash.cc
+++ /dev/null
@@ -1,117 +0,0 @@
-/** @file
-
- A brief file description
-
- @section license License
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-/****************************************************************************
-
- TestClusterHash.cc
- ****************************************************************************/
-#include "Cluster.h"
-#include "ts/ink_platform.h"
-
-//
-// This test function produces the table included
-// in Memo.ClusterHash
-//
-
-void
-test()
-{
- int n[CLUSTER_MAX_MACHINES];
- int i;
- Machine *m;
- int j;
- ink_hrtime t, t2;
- int total;
- int high, low, share;
- int version = 7;
-
- while (version > -1) {
- // the select the version
- //
- machineClusterHash = !!(version & 1);
- boundClusterHash = !!(version & 2);
- randClusterHash = !!(version & 4);
-
- // fabricate fake cluster
-
- clusterProcessor.this_cluster = new Cluster;
- ClusterConfiguration *cc = new ClusterConfiguration;
- cc->n_machines = 1;
- cc->machines[0] = this_cluster_machine();
- memset(cc->hash_table, 0, CLUSTER_HASH_TABLE_SIZE);
- clusterProcessor.this_cluster->configurations.push(cc);
-
- ClusterConfiguration *c = this_cluster()->current_configuration();
-
- printf("hash by %s - %s - %s\n", (machineClusterHash ? "MACHINE" : "BUCKET"), (boundClusterHash ? "BOUNDED" : "UNBOUND"),
- (randClusterHash ? "RAND" : "LINEAR CONGUENCE"));
-
- // from 1 to 32 machines
-
- for (i = 1; i < 32; i++) {
- m = new ClusterMachine(*this_cluster_machine());
- m->ip += i;
- t = ink_get_hrtime();
- cc = configuration_add_machine(c, m);
- t2 = ink_get_hrtime();
-
- //
- // Compute new distribution
- //
- high = 0;
- low = CLUSTER_HASH_TABLE_SIZE + 1;
- for (j = 0; j < cc->n_machines; j++)
- n[j] = 0;
- for (j = 0; j < CLUSTER_HASH_TABLE_SIZE; j++) {
- ink_assert(cc->hash_table[j] < cc->n_machines);
- n[cc->hash_table[j]]++;
- }
- total = CLUSTER_HASH_TABLE_SIZE;
- for (j = 0; j < cc->n_machines; j++) {
- total -= n[j];
- if (low > n[j])
- low = n[j];
- if (high < n[j])
- high = n[j];
- }
- ink_assert(!total);
- printf("n = %d:", i);
- printf(" high = %d low = %d high/low = %f", high, low, (float)high / (float)low);
-
- //
- // Compute sharing with n-1
- //
- share = 0;
- for (j = 0; j < CLUSTER_HASH_TABLE_SIZE; j++) {
- if (c->machines[c->hash_table[j]] == cc->machines[cc->hash_table[j]])
- share++;
- }
- printf(" shared = %d %%%6.2f", share, (float)share / (float)CLUSTER_HASH_TABLE_SIZE);
-
- printf(" time = %f secs\n", ((float)(t2 - t) / (float)HRTIME_SECONDS(1)));
- c = cc;
- }
-
- version--;
- }
-}
diff --git a/proxy/http/HttpCacheSM.cc b/proxy/http/HttpCacheSM.cc
index 74cdfca..c5f36ee 100644
--- a/proxy/http/HttpCacheSM.cc
+++ b/proxy/http/HttpCacheSM.cc
@@ -250,8 +250,7 @@ HttpCacheSM::do_cache_open_read(const HttpCacheKey &key)
}
// Initialising read-while-write-inprogress flag
this->readwhilewrite_inprogress = false;
- Action *action_handle = cacheProcessor.open_read(this, &key, master_sm->t_state.cache_control.cluster_cache_local,
- this->read_request_hdr, this->http_params, this->read_pin_in_cache);
+ Action *action_handle = cacheProcessor.open_read(this, &key, this->read_request_hdr, this->http_params, this->read_pin_in_cache);
if (action_handle != ACTION_RESULT_DONE) {
pending_action = action_handle;
@@ -340,7 +339,7 @@ HttpCacheSM::open_write(const HttpCacheKey *key, URL *url, HTTPHdr *request, Cac
}
Action *action_handle =
- cacheProcessor.open_write(this, 0, key, master_sm->t_state.cache_control.cluster_cache_local, request,
+ cacheProcessor.open_write(this, 0, key, request,
// INKqa11166
allow_multiple ? (CacheHTTPInfo *)CACHE_ALLOW_MULTIPLE_WRITES : old_info, pin_in_cache);
diff --git a/proxy/http/HttpConfig.cc b/proxy/http/HttpConfig.cc
index 91779f2..c28faab 100644
--- a/proxy/http/HttpConfig.cc
+++ b/proxy/http/HttpConfig.cc
@@ -1030,7 +1030,6 @@ HttpConfig::startup()
HttpEstablishStaticConfigLongLong(c.oride.max_cache_open_write_retries, "proxy.config.http.cache.max_open_write_retries");
HttpEstablishStaticConfigByte(c.oride.cache_http, "proxy.config.http.cache.http");
- HttpEstablishStaticConfigByte(c.oride.cache_cluster_cache_local, "proxy.config.http.cache.cluster_cache_local");
HttpEstablishStaticConfigByte(c.oride.cache_ignore_client_no_cache, "proxy.config.http.cache.ignore_client_no_cache");
HttpEstablishStaticConfigByte(c.oride.cache_ignore_client_cc_max_age, "proxy.config.http.cache.ignore_client_cc_max_age");
HttpEstablishStaticConfigByte(c.oride.cache_ims_on_client_no_cache, "proxy.config.http.cache.ims_on_client_no_cache");
@@ -1125,11 +1124,6 @@ HttpConfig::startup()
// Local Manager
HttpEstablishStaticConfigLongLong(c.synthetic_port, "proxy.config.admin.synthetic_port");
- // Cluster time delta gets it own callback since it needs
- // to use ink_atomic_swap
- c.cluster_time_delta = 0;
- RegisterMgmtCallback(MGMT_EVENT_HTTP_CLUSTER_DELTA, cluster_delta_cb, nullptr);
-
http_config_cont->handleEvent(EVENT_NONE, nullptr);
return;
@@ -1317,7 +1311,6 @@ HttpConfig::reconfigure()
params->oride.max_cache_open_write_retries = m_master.oride.max_cache_open_write_retries;
params->oride.cache_http = INT_TO_BOOL(m_master.oride.cache_http);
- params->oride.cache_cluster_cache_local = INT_TO_BOOL(m_master.oride.cache_cluster_cache_local);
params->oride.cache_ignore_client_no_cache = INT_TO_BOOL(m_master.oride.cache_ignore_client_no_cache);
params->oride.cache_ignore_client_cc_max_age = INT_TO_BOOL(m_master.oride.cache_ignore_client_cc_max_age);
params->oride.cache_ims_on_client_no_cache = INT_TO_BOOL(m_master.oride.cache_ims_on_client_no_cache);
@@ -1525,24 +1518,4 @@ HttpConfig::parse_ports_list(char *ports_string)
return (ports_list);
}
-////////////////////////////////////////////////////////////////
-//
-// HttpConfig::cluster_delta_cb
-//
-////////////////////////////////////////////////////////////////
-void *
-HttpConfig::cluster_delta_cb(void * /* opaque_token ATS_UNUSED */, char *data_raw, int /* data_len ATS_UNUSED */)
-{
- int32_t delta32 = (int32_t)atoi(data_raw);
- int32_t old;
-
- // Using ink_atomic_swap is mostly paranoia since a thirty bit write
- // really ought to atomic. However, any risk of bogus time is
- // too ugly for me to contemplate
- old = ink_atomic_swap(&HttpConfig::m_master.cluster_time_delta, delta32);
- Debug("http_trans", "Cluster time delta moving from %d to %d", old, delta32);
-
- return nullptr;
-}
-
volatile int32_t icp_dynamic_enabled;
diff --git a/proxy/http/HttpConfig.h b/proxy/http/HttpConfig.h
index 2593f80..cc1b42c 100644
--- a/proxy/http/HttpConfig.h
+++ b/proxy/http/HttpConfig.h
@@ -393,7 +393,6 @@ struct OverridableHttpConfigParams {
insert_squid_x_forwarded_for(1),
send_http11_requests(1),
cache_http(1),
- cache_cluster_cache_local(0),
cache_ignore_client_no_cache(1),
cache_ignore_client_cc_max_age(0),
cache_ims_on_client_no_cache(1),
@@ -539,7 +538,6 @@ struct OverridableHttpConfigParams {
// cache control //
///////////////////
MgmtByte cache_http;
- MgmtByte cache_cluster_cache_local;
MgmtByte cache_ignore_client_no_cache;
MgmtByte cache_ignore_client_cc_max_age;
MgmtByte cache_ims_on_client_no_cache;
@@ -744,10 +742,6 @@ public:
int proxy_request_via_string_len;
int proxy_response_via_string_len;
- // Cluster time delta is not a config variable,
- // rather it is the time skew which the manager observes
- int32_t cluster_time_delta;
-
MgmtInt accept_no_activity_timeout;
////////////////////////////////////
@@ -858,7 +852,6 @@ public:
// parse ssl ports configuration string
static HttpConfigPortRange *parse_ports_list(char *ports_str);
- static void *cluster_delta_cb(void *opaque_token, char *data_raw, int data_len);
public:
static int m_id;
@@ -883,7 +876,6 @@ inline HttpConfigParams::HttpConfigParams()
proxy_response_via_string(NULL),
proxy_request_via_string_len(0),
proxy_response_via_string_len(0),
- cluster_time_delta(0),
accept_no_activity_timeout(120),
per_parent_connect_attempts(2),
parent_connect_timeout(30),
diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc
index 44b2656..89446c2 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -2090,7 +2090,7 @@ HttpSM::process_srv_info(HostDBInfo *r)
HostDBRoundRobin *rr = r->rr();
HostDBInfo *srv = nullptr;
if (rr) {
- srv = rr->select_best_srv(t_state.dns_info.srv_hostname, &mutex->thread_holding->generator, ink_cluster_time(),
+ srv = rr->select_best_srv(t_state.dns_info.srv_hostname, &mutex->thread_holding->generator, ink_local_time(),
(int)t_state.txn_conf->down_server_timeout);
}
if (!srv) {
@@ -2136,7 +2136,7 @@ HttpSM::process_hostdb_info(HostDBInfo *r)
}
if (r && !r->is_failed()) {
- ink_time_t now = ink_cluster_time();
+ ink_time_t now = ink_local_time();
HostDBInfo *ret = nullptr;
t_state.dns_info.lookup_success = true;
t_state.dns_info.lookup_validated = true;
@@ -4596,7 +4596,7 @@ HttpSM::do_cache_delete_all_alts(Continuation *cont)
HttpCacheKey key;
Cache::generate_key(&key, t_state.cache_info.lookup_url, t_state.txn_conf->cache_generation_number);
- cache_action_handle = cacheProcessor.remove(cont, &key, t_state.cache_control.cluster_cache_local);
+ cache_action_handle = cacheProcessor.remove(cont, &key);
if (cont != nullptr) {
if (cache_action_handle != ACTION_RESULT_DONE) {
ink_assert(!pending_action);
@@ -5253,7 +5253,7 @@ HttpSM::mark_host_failure(HostDBInfo *info, time_t time_down)
info->app.http_data.last_failure = time_down;
#ifdef DEBUG
- ink_assert(ink_cluster_time() + t_state.txn_conf->down_server_timeout > time_down);
+ ink_assert(ink_local_time() + t_state.txn_conf->down_server_timeout > time_down);
#endif
DebugSM("http", "[%" PRId64 "] hostdb update marking IP: %s as down", sm_id,
diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc
index baea421..df9d7ef 100644
--- a/proxy/http/HttpTransact.cc
+++ b/proxy/http/HttpTransact.cc
@@ -2047,7 +2047,7 @@ HttpTransact::HandlePushResponseHdr(State *s)
if (!s->cop_test_page)
DUMP_HEADER("http_hdrs", &s->hdr_info.server_request, s->state_machine_id, "Generated Request Header");
- s->response_received_time = s->request_sent_time = ink_cluster_time();
+ s->response_received_time = s->request_sent_time = ink_local_time();
if (is_response_cacheable(s, &s->hdr_info.server_request, &s->hdr_info.server_response)) {
ink_assert(s->cache_info.action == CACHE_PREPARE_TO_WRITE || s->cache_info.action == CACHE_PREPARE_TO_UPDATE);
@@ -3312,7 +3312,7 @@ HttpTransact::HandleResponse(State *s)
DebugTxn("http_seq", "[HttpTransact::HandleResponse] Response received");
s->source = SOURCE_HTTP_ORIGIN_SERVER;
- s->response_received_time = ink_cluster_time();
+ s->response_received_time = ink_local_time();
ink_assert(s->response_received_time >= s->request_sent_time);
s->current.now = s->response_received_time;
@@ -4349,7 +4349,7 @@ HttpTransact::handle_cache_operation_on_forward_server_response(State *s)
s->cache_info.object_store.request_set(&s->hdr_info.client_request);
s->cache_info.object_store.response_set(s->cache_info.object_read->response_get());
base_response = s->cache_info.object_store.response_get();
- time_t exp_time = s->txn_conf->negative_revalidating_lifetime + ink_cluster_time();
+ time_t exp_time = s->txn_conf->negative_revalidating_lifetime + ink_local_time();
base_response->set_expires(exp_time);
SET_VIA_STRING(VIA_CACHE_FILL_ACTION, VIA_CACHE_UPDATED);
@@ -4472,7 +4472,7 @@ HttpTransact::handle_cache_operation_on_forward_server_response(State *s)
s->cache_info.object_store.response_set(&s->hdr_info.server_response);
resp = s->cache_info.object_store.response_get();
if (!resp->presence(MIME_PRESENCE_EXPIRES)) {
- time_t exp_time = s->txn_conf->negative_caching_lifetime + ink_cluster_time();
+ time_t exp_time = s->txn_conf->negative_caching_lifetime + ink_local_time();
resp->set_expires(exp_time);
}
@@ -5612,7 +5612,7 @@ HttpTransact::initialize_state_variables_for_origin_server(State *s, HTTPHdr *in
void
HttpTransact::bootstrap_state_variables_from_request(State *s, HTTPHdr *incoming_request)
{
- s->current.now = s->client_request_time = ink_cluster_time();
+ s->current.now = s->client_request_time = ink_local_time();
s->client_info.http_version = incoming_request->version_get();
}
@@ -7843,7 +7843,7 @@ HttpTransact::build_request(State *s, HTTPHdr *base_request, HTTPHdr *outgoing_r
DebugTxn("http_trans", "[build_request] request expect 100-continue headers removed");
}
- s->request_sent_time = ink_cluster_time();
+ s->request_sent_time = ink_local_time();
s->current.now = s->request_sent_time;
// The assert is backwards in this case because request is being (re)sent.
ink_assert(s->request_sent_time >= s->response_received_time);
@@ -8313,27 +8313,9 @@ HttpTransact::get_error_string(int erno)
}
ink_time_t
-ink_cluster_time()
+ink_local_time()
{
- int highest_delta;
- ink_time_t local_time;
-
- local_time = Thread::get_hrtime() / HRTIME_SECOND;
- highest_delta = (int)HttpConfig::m_master.cluster_time_delta;
- // highest_delta =
- // lmgmt->record_data->readInteger("proxy.process.http.cluster_delta",
- // &found);
- // if (! found) {
- // ink_assert(!"Highest delta config value not found!");
- // highest_delta = 0L;
- // }
-
- Debug("http_trans", "[ink_cluster_time] local: %" PRId64 ", highest_delta: %d, cluster: %" PRId64, (int64_t)local_time,
- highest_delta, (int64_t)(local_time + (ink_time_t)highest_delta));
-
- ink_assert(highest_delta >= 0);
-
- return local_time + (ink_time_t)highest_delta;
+ return Thread::get_hrtime() / HRTIME_SECOND;
}
//
diff --git a/proxy/http/HttpTransact.h b/proxy/http/HttpTransact.h
index 1d47619..5f457bd 100644
--- a/proxy/http/HttpTransact.h
+++ b/proxy/http/HttpTransact.h
@@ -47,7 +47,6 @@
#define MAX_DNS_LOOKUPS 2
#define HTTP_RELEASE_ASSERT(X) ink_release_assert(X)
-// #define ink_cluster_time(X) time(X)
#define ACQUIRE_PRINT_LOCK() // ink_mutex_acquire(&print_lock);
#define RELEASE_PRINT_LOCK() // ink_mutex_release(&print_lock);
@@ -1363,6 +1362,6 @@ is_response_body_precluded(HTTPStatus status_code, int method)
}
}
-inkcoreapi extern ink_time_t ink_cluster_time(void);
+inkcoreapi extern ink_time_t ink_local_time(void);
#endif
diff --git a/proxy/http/HttpTransactCache.cc b/proxy/http/HttpTransactCache.cc
index f03eb32..f5068de 100644
--- a/proxy/http/HttpTransactCache.cc
+++ b/proxy/http/HttpTransactCache.cc
@@ -211,7 +211,7 @@ HttpTransactCache::SelectFromAlternates(CacheHTTPInfoVector *cache_vector, HTTPH
if (alt_count > 1) {
if (t_now == 0) {
- t_now = ink_cluster_time();
+ t_now = ink_local_time();
}
current_age = HttpTransactHeaders::calculate_document_age(obj->request_sent_time_get(), obj->response_received_time_get(),
cached_response, cached_response->get_date(), t_now);
--
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].