This is an automated email from the ASF dual-hosted git repository. bcall pushed a commit to branch 7.0.x in repository https://git-dual.apache.org/repos/asf/trafficserver.git
commit 31df140738b5c52d227a3b88e2323bff654b5707 Author: Shrihari Kalkar <kshr...@hotmail.com> AuthorDate: Wed Aug 17 19:32:49 2016 -0700 Fix race condition in traffic_server startup Set max_msgs_in_row to 1 during traffic_server startup to avoid hitting race condition as seen in issue TS-4735 (cherry picked from commit 0fd360bd3154a02a8c532de87f6b001adf14ed7f) --- mgmt/ProcessManager.cc | 7 ++++--- mgmt/ProcessManager.h | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/mgmt/ProcessManager.cc b/mgmt/ProcessManager.cc index 0ddfcbc..a5c61cd 100644 --- a/mgmt/ProcessManager.cc +++ b/mgmt/ProcessManager.cc @@ -68,7 +68,7 @@ startProcessManager(void *arg) return ret; } /* End startProcessManager */ -ProcessManager::ProcessManager(bool rlm) : BaseManager(), require_lm(rlm), local_manager_sockfd(0), cbtable(NULL) +ProcessManager::ProcessManager(bool rlm) : BaseManager(), require_lm(rlm), local_manager_sockfd(0), cbtable(NULL), max_msgs_in_a_row(1) { mgmt_signal_queue = create_queue(); @@ -83,6 +83,7 @@ void ProcessManager::reconfigure() { bool found; + max_msgs_in_a_row = MAX_MSGS_IN_A_ROW; timeout = REC_readInteger("proxy.config.process_manager.timeout", &found); ink_assert(found); @@ -226,7 +227,7 @@ ProcessManager::pollLMConnection() // Avoid getting stuck enqueuing too many requests in a row, limit to MAX_MSGS_IN_A_ROW. int count; - for (count = 0; count < MAX_MSGS_IN_A_ROW; ++count) { + for (count = 0; count < max_msgs_in_a_row; ++count) { int num; num = mgmt_read_timeout(local_manager_sockfd, 1 /* sec */, 0 /* usec */); @@ -262,7 +263,7 @@ ProcessManager::pollLMConnection() } } - Debug("pmgmt", "[ProcessManager::pollLMConnection] enqueued %d of max %d messages in a row", count, MAX_MSGS_IN_A_ROW); + Debug("pmgmt", "[ProcessManager::pollLMConnection] enqueued %d of max %d messages in a row", count, max_msgs_in_a_row); } /* End ProcessManager::pollLMConnection */ void diff --git a/mgmt/ProcessManager.h b/mgmt/ProcessManager.h index 7ea5072..97a67a4 100644 --- a/mgmt/ProcessManager.h +++ b/mgmt/ProcessManager.h @@ -103,6 +103,7 @@ private: static const int MAX_MSGS_IN_A_ROW = 10000; ConfigUpdateCbTable *cbtable; + int max_msgs_in_a_row; }; /* End class ProcessManager */ inkcoreapi extern ProcessManager *pmgmt; -- To stop receiving notification emails like this one, please contact "commits@trafficserver.apache.org" <commits@trafficserver.apache.org>.