trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shinr...@apache.org
Subject trafficserver git commit: TS-3413: High CPU utiliziation when processing Http/2 traffic.
Date Mon, 02 Mar 2015 14:31:40 GMT
Repository: trafficserver
Updated Branches:
  refs/heads/master fadcd18ab -> 3f3667d10


TS-3413: High CPU utiliziation when processing Http/2 traffic.


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

Branch: refs/heads/master
Commit: 3f3667d10c9bd743127790d492d2fb15245f98a0
Parents: fadcd18
Author: shinrich <shinrich@yahoo-inc.com>
Authored: Mon Mar 2 08:24:51 2015 -0600
Committer: shinrich <shinrich@yahoo-inc.com>
Committed: Mon Mar 2 08:27:04 2015 -0600

----------------------------------------------------------------------
 CHANGES                             | 2 ++
 proxy/http2/Http2ConnectionState.cc | 8 +++++++-
 2 files changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/3f3667d1/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 15a32db..872ef35 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache Traffic Server 5.3.0
 
+  *) [TS-3413] High CPU utiliziation when processing HTTP/2 traffic.
+
   *) [TS-3420] Remove duplication of TS_RES_MEM_PATH, which is in apidefs.h.
 
   *) [TS-3405] Memory use after free in HTTP/2.

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/3f3667d1/proxy/http2/Http2ConnectionState.cc
----------------------------------------------------------------------
diff --git a/proxy/http2/Http2ConnectionState.cc b/proxy/http2/Http2ConnectionState.cc
index 42e7933..7f02c45 100644
--- a/proxy/http2/Http2ConnectionState.cc
+++ b/proxy/http2/Http2ConnectionState.cc
@@ -825,8 +825,14 @@ Http2ConnectionState::send_data_frame(FetchSM *fetch_sm)
     size_t send_size   = min(buf_len, window_size);
 
     size_t payload_length = fetch_sm->ext_read_data(reinterpret_cast<char*>(payload_buffer),
send_size);
-    if (payload_length == 0) break;
 
+    // If we break here, we never send the END_STREAM in the case of a
+    // early terminating OS.  Ok if there is no body yet.  Otherwise 
+    // continue on to delete the stream
+    if (payload_length == 0 && !stream->is_body_done()) {
+      break;
+    }
+ 
     // Update window size
     this->client_rwnd -= payload_length;
     stream->client_rwnd -= payload_length;


Mime
View raw message