You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2013/09/24 21:33:52 UTC

[1/3] git commit: TS-2191 we should not simply reschdule the http_sm if the sm_list`s mutex is not acquired, because the client_vc`s timeout events maybe triggered. The race may lead http_sm received a event after it is deleted. Sub task (TS-2192)

Updated Branches:
  refs/heads/4.0.x d2bab43c9 -> b1d6a80d6


TS-2191 we should not simply reschdule the http_sm if the sm_list`s mutex
is not acquired, because the client_vc`s timeout events maybe triggered.
The race may lead http_sm received a event after it is deleted.
Sub task (TS-2192)


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

Branch: refs/heads/4.0.x
Commit: 338b6ef3040bbf7501c220ab1553077399b914a4
Parents: d2bab43
Author: weijin <ta...@taobao.com>
Authored: Mon Sep 9 23:36:34 2013 +0800
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Tue Sep 24 13:20:57 2013 -0600

----------------------------------------------------------------------
 CHANGES              |  3 +++
 proxy/http/HttpSM.cc | 12 +++++-------
 2 files changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/338b6ef3/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index cc732de..dcf9009 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
+
 Changes with Apache Traffic Server 4.0.2
 
+  *) [TS-2191] not reschedule http_sm when the sm_list`s lock is not acquired.
+
   *) [TS-2174] traffic_shell/traffic_line miss some stats value
 
   *) [TS-2173] RECD_COUNTER type is missing in setTokenValue().

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/338b6ef3/proxy/http/HttpSM.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc
index 7bba241..b57ead2 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -520,13 +520,11 @@ HttpSM::state_add_to_list(int event, void * /* data ATS_UNUSED */)
     int bucket = ((unsigned int) sm_id % HTTP_LIST_BUCKETS);
 
     MUTEX_TRY_LOCK(lock, HttpSMList[bucket].mutex, mutex->thread_holding);
-    if (!lock) {
-      HTTP_SM_SET_DEFAULT_HANDLER(&HttpSM::state_add_to_list);
-      mutex->thread_holding->schedule_in(this, HTTP_LIST_RETRY);
-      return EVENT_DONE;
-    }
-
-    HttpSMList[bucket].sm_list.push(this);
+    // the client_vc`s timeout events can be triggered, so we should not
+    // reschedule the http_sm when the lock is not acquired.
+    // FIXME: the sm_list may miss some http_sms when the lock contention
+    if (lock)
+      HttpSMList[bucket].sm_list.push(this);
   }
 
   t_state.api_next_action = HttpTransact::HTTP_API_SM_START;


[2/3] git commit: Updated CHANGES.

Posted by zw...@apache.org.
Updated CHANGES.


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

Branch: refs/heads/4.0.x
Commit: dc324a8f622db689a4e338c915cfef02e4e1fd7e
Parents: 338b6ef
Author: Leif Hedstrom <zw...@apache.org>
Authored: Tue Sep 24 13:21:32 2013 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Tue Sep 24 13:21:32 2013 -0600

----------------------------------------------------------------------
 CHANGES | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dc324a8f/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index dcf9009..a227f72 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,4 @@
                                                          -*- coding: utf-8 -*-
-
 Changes with Apache Traffic Server 4.0.2
 
   *) [TS-2191] not reschedule http_sm when the sm_list`s lock is not acquired.


[3/3] git commit: TS-2217: remove the option to turn off body factory - setting it to 0 will result in empty responses

Posted by zw...@apache.org.
TS-2217: remove the option to turn off body factory - setting it to 0
will result in empty responses

Conflicts:
	CHANGES


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

Branch: refs/heads/4.0.x
Commit: b1d6a80d66dd848839deb95e2d5a0cae8e62adae
Parents: dc324a8
Author: Bryan Call <bc...@apache.org>
Authored: Thu Sep 12 17:03:07 2013 -0700
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Tue Sep 24 13:24:20 2013 -0600

----------------------------------------------------------------------
 CHANGES               | 3 +++
 mgmt/RecordsConfig.cc | 4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b1d6a80d/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index a227f72..2eb97a8 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache Traffic Server 4.0.2
 
+  *) [TS-2217] remove the option to turn off body factory - setting it to 0 will
+   result in empty responses
+
   *) [TS-2191] not reschedule http_sm when the sm_list`s lock is not acquired.
 
   *) [TS-2174] traffic_shell/traffic_line miss some stats value

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b1d6a80d/mgmt/RecordsConfig.cc
----------------------------------------------------------------------
diff --git a/mgmt/RecordsConfig.cc b/mgmt/RecordsConfig.cc
index bf4b9ee..49d6da5 100644
--- a/mgmt/RecordsConfig.cc
+++ b/mgmt/RecordsConfig.cc
@@ -702,10 +702,10 @@ RecordElement RecordsConfig[] = {
   //# Customizable User Response Pages
   //#
   //##############################################################################
-  //# 0 - turn off customizable user response pages
   //# 1 - enable customizable user response pages in only the "default" directory
   //# 2 - enable language-targeted user response pages
-  {RECT_CONFIG, "proxy.config.body_factory.enable_customizations", RECD_INT, "1", RECU_RESTART_TS, RR_NULL, RECC_INT, "[0-2]", RECA_NULL}
+  {RECT_CONFIG, "proxy.config.body_factory.enable_customizations", RECD_INT, "1", RECU_RESTART_TS, RR_NULL, RECC_INT,
+    "[1-2]", RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.body_factory.enable_logging", RECD_INT, "0", RECU_RESTART_TS, RR_NULL, RECC_INT, "[0-1]", RECA_NULL}
   ,