trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From z..@apache.org
Subject git commit: TS-1321 improve RT on Cluster purge miss
Date Wed, 27 Jun 2012 10:59:18 GMT
Updated Branches:
  refs/heads/master c543a50fb -> f0a98cdc7


TS-1321 improve RT on Cluster purge miss


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

Branch: refs/heads/master
Commit: f0a98cdc7b950e1ecefde94694de5dfd800248aa
Parents: c543a50
Author: Bin Chen <kuotai@taobao.com>
Authored: Wed Jun 27 18:31:00 2012 +0800
Committer: Zhao Yongming <ming.zym@gmail.com>
Committed: Wed Jun 27 18:35:10 2012 +0800

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


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f0a98cdc/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index cf44c48..757b907 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,8 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache Traffic Server 3.3.0
+  *) [TS-1321] improve RT on Cluster purge missing objects
+   Author: Bin Chen
+
   *) [TS-1312] Allow to open cache disk without O_DIRECT, for e.g. tmpfs
    "disk" cache.
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f0a98cdc/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/f0a98cdc/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),


Mime
View raw message