You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zy...@apache.org on 2013/10/31 17:31:19 UTC

git commit: TS-2247: ua close time in milestone may not set

Updated Branches:
  refs/heads/master 7845084ea -> d1006996b


TS-2247: ua close time in milestone may not set


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

Branch: refs/heads/master
Commit: d1006996b3f0db0fe8f91ee9733ba68bf22a3a40
Parents: 7845084
Author: Gang Li <qu...@taobao.com>
Authored: Fri Nov 1 00:29:01 2013 +0800
Committer: Zhao Yongming <mi...@gmail.com>
Committed: Fri Nov 1 00:30:45 2013 +0800

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


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/d1006996/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index adb0e0d..18a67f1 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@
 Changes with Apache Traffic Server 4.1.0
 
 
+  *) [TS-2247] ua close time in milestone may not set.
+   Author: Gang Li
+
   *) [TS-2302] Log collation causes error logging to stop.
 
   *) [TS-2200] TS_HRTIME_xxx in experimental.h is invalid to use.

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/d1006996/proxy/http/HttpSM.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc
index b04c2c2..625defe 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -6538,6 +6538,11 @@ HttpSM::update_stats()
 
   ink_hrtime total_time = milestones.sm_finish - milestones.sm_start;
 
+  // ua_close will not be assigned properly in some exceptional situation.
+  // TODO: Assign ua_close with situable value when HttpTunnel terminates abnormally.
+  if (milestones.ua_close == 0 && milestones.ua_read_header_done > 0)
+    milestones.ua_close = ink_get_hrtime();
+
   // request_process_time  = The time after the header is parsed to the completion of the transaction
   ink_hrtime request_process_time = milestones.ua_close - milestones.ua_read_header_done;