You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ig...@apache.org on 2012/10/13 10:18:57 UTC

[1/2] git commit: TS-1522 improve RT on Cluster purge miss

Updated Branches:
  refs/heads/3.2.x d1521d0cf -> ec4d61c43


TS-1522 improve RT on Cluster purge miss

backport of TS-1522/f0a98cdc7b950e1ecefde94694de5dfd800248aa
test/review: zwoop, zym, jpeach
backport: igalic


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

Branch: refs/heads/3.2.x
Commit: ec4d61c43c40cb8bd19ef67bdb5fc5794b697db3
Parents: 9dd36db
Author: Bin Chen <ku...@taobao.com>
Authored: Wed Jun 27 18:31:00 2012 +0800
Committer: Igor Galić <i....@brainsware.org>
Committed: Sat Oct 13 10:12:37 2012 +0200

----------------------------------------------------------------------
 CHANGES                                 |    3 +++
 STATUS                                  |    5 -----
 iocore/cluster/ClusterCache.cc          |    3 ++-
 iocore/cluster/P_ClusterCacheInternal.h |    2 ++
 4 files changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/ec4d61c4/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index ee1240d..ea3cd16 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache Traffic Server 3.2.3
 
+  *) [TS-1522] improve RT on Cluster purge missing objects
+   Author: Bin Chen
+
   *) [TS-1484] SSL-crashed every now and then with 3.2.0 + SNI-fixes
 
   *) [TS-1514] Fix collation in custom logging.

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/ec4d61c4/STATUS
----------------------------------------------------------------------
diff --git a/STATUS b/STATUS
index 8eadac6..9926a74 100644
--- a/STATUS
+++ b/STATUS
@@ -41,11 +41,6 @@ A list of all bugs open for the next development release can be found at
 
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
 
-  *) Improve response times for for Cluster purge & miss
-   Trunk: f0a98cdc7b950e1ecefde94694de5dfd800248aa
-   Jira: https://issues.apache.org/jira/browse/TS-1321
-   +1: zwoop (seems ok, but not tested myself), zym, jpeach
-
   *) Fix abnormally high CPU usage on FreeBSD/OpenBSD while idle.
    Trunk: 8665bbb1e5f34e6de5d709b0314a8fcb1eefec8d
    Jira: https://issues.apache.org/jira/browse/TS-993 (in part)

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/ec4d61c4/iocore/cluster/ClusterCache.cc
----------------------------------------------------------------------
diff --git a/iocore/cluster/ClusterCache.cc b/iocore/cluster/ClusterCache.cc
index 51f375e..a4093d2 100644
--- a/iocore/cluster/ClusterCache.cc
+++ b/iocore/cluster/ClusterCache.cc
@@ -1210,6 +1210,7 @@ cache_op_ClusterFunction(ClusterHandler * ch, void *data, int len)
       res = c->ic_request.unmarshal((char *) p, moi_len, NULL);
       ink_assert(res > 0);
       ink_assert(c->ic_request.valid());
+      c->request_purge = c->ic_request.method_get_wksidx() == HTTP_WKSIDX_PURGE || c->ic_request.method_get_wksidx() == HTTP_WKSIDX_DELETE;
       moi_len -= res;
       p += res;
       ink_assert(moi_len > 0);
@@ -1597,7 +1598,7 @@ CacheContinuation::setupReadWriteVC(int event, VConnection * vc)
     }
   case CACHE_EVENT_OPEN_READ_FAILED:
     {
-      if (frag_type == CACHE_FRAG_TYPE_HTTP) {
+      if (frag_type == CACHE_FRAG_TYPE_HTTP && !request_purge) {
         // HTTP open read failed, attempt open write now to avoid an additional
         //  message round trip
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/ec4d61c4/iocore/cluster/P_ClusterCacheInternal.h
----------------------------------------------------------------------
diff --git a/iocore/cluster/P_ClusterCacheInternal.h b/iocore/cluster/P_ClusterCacheInternal.h
index aea7beb..7c1658d 100644
--- a/iocore/cluster/P_ClusterCacheInternal.h
+++ b/iocore/cluster/P_ClusterCacheInternal.h
@@ -116,6 +116,7 @@ struct CacheContinuation:public Continuation
   int nbytes;
   unsigned int target_ip;
   int request_opcode;
+  bool request_purge;
   bool local_lookup_only;
   bool no_reply_message;
   bool request_timeout;         // timeout occurred before
@@ -288,6 +289,7 @@ CacheContinuation():
     nbytes(0),
     target_ip(0),
     request_opcode(0),
+    request_purge(false),
     local_lookup_only(0),
     no_reply_message(0),
     request_timeout(0),