Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(223)

Issue 13834009: SPDY - Re-land greedy read support for SpdySession (Closed)

Created:
7 years, 8 months ago by ramant (doing other things)
Modified:
7 years, 8 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org
Visibility:
Public.

Description

Re-land greedy read support for SpdySession Added Unit test to close the socket during spdy_session's read and verifying that getting new URLs from the same network session don't result in a failure. Modified mock socket code to close the connection if mock_read closes the connection (because of ERR_CONNECTION_CLOSED error). Implement greedy approach to read all the data and process it from the ClientSocket until we block. Implemented the greedy approach to improves the network stack performance on the mobile. spdy_session_test_util.* files have the common code between SpdySessionSpd2Test and SpdySessionSpd3Test. Created this file to reduce errors and to avoid duplicating of code. Review URL: https://chromiumcodereview.appspot.com/11644088 The change adds a scoped_refptr to SpdySession in DoLoop to clean up the state and to finish pending reads, in case SpdyFramer receives GOAway and closes all streams. DoReadComplete was holding the last reference before and DoLoop was accessing the object after DoReadComplete deleted the object at the end of the function. Review URL: https://codereview.chromium.org/12212102 Added unit tests for use after free of SpdySession and unit test to test yielding + async during Read. A test that crashes when scoped_refptr to SpdySession deleted from DoLoop. Added the following test per rch@ to test interactions of yielding + async during Read. Do the following MockReads and verify all the data is consumed and SpdySession has yielded during Read. SYNCHRONOUS 8K SYNCHRONOUS 8K SYNCHRONOUS 8K SYNCHRONOUS 2K ASYNC 8K SYNCHRONOUS 8K SYNCHRONOUS 8K SYNCHRONOUS 8K SYNCHRONOUS 2K Review URL: https://chromiumcodereview.appspot.com/12207122 Reverted URL: https://chromiumcodereview.appspot.com/13608003/ BUG=175574, 166958, 224701, 175069 R=rch@chromium.org, jar@chromium.org TEST=network unit tests Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=194540

Patch Set 1 #

Total comments: 4

Patch Set 2 : Reverting the Revert of 181390 and disabled the tests in patch 1 #

Total comments: 2

Patch Set 3 : Fixing the regression with SpdySession - handle ERR_CONNECTION_CLOSED after read #

Patch Set 4 : histograms to track bytes_read during init #

Total comments: 2

Patch Set 5 : Two new histograms for total bytes read #

Total comments: 3

Patch Set 6 : Changed histogram name and added DCHECK in DoLoop #

Patch Set 7 : Return ERR_CONNECTION_CLOSED when SpdySession is closed #

Patch Set 8 : Merging changes from tip #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1118 lines, -89 lines) Patch
M net/http/http_network_transaction_spdy2_unittest.cc View 1 2 1 chunk +77 lines, -0 lines 0 comments Download
M net/http/http_network_transaction_spdy3_unittest.cc View 1 2 1 chunk +77 lines, -0 lines 0 comments Download
M net/net.gyp View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M net/socket/socket_test_util.h View 1 chunk +1 line, -0 lines 0 comments Download
M net/socket/socket_test_util.cc View 1 2 5 chunks +22 lines, -2 lines 0 comments Download
M net/spdy/spdy_session.h View 1 2 3 4 5 6 7 7 chunks +34 lines, -11 lines 0 comments Download
M net/spdy/spdy_session.cc View 1 2 3 4 5 6 7 14 chunks +101 lines, -76 lines 0 comments Download
M net/spdy/spdy_session_spdy2_unittest.cc View 1 2 3 4 5 6 7 2 chunks +374 lines, -0 lines 0 comments Download
M net/spdy/spdy_session_spdy3_unittest.cc View 1 2 3 4 5 6 7 2 chunks +346 lines, -0 lines 0 comments Download
A net/spdy/spdy_session_test_util.h View 1 2 1 chunk +46 lines, -0 lines 0 comments Download
A net/spdy/spdy_session_test_util.cc View 1 2 1 chunk +38 lines, -0 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
ramant (doing other things)
7 years, 8 months ago (2013-04-12 01:27:03 UTC) #1
Ryan Hamilton
I like the test in patch set 1. I think you could possibly commit that ...
7 years, 8 months ago (2013-04-12 02:50:31 UTC) #2
ramant (doing other things)
This patch fixes the regression. It acts on the error (including reading of no bytes) ...
7 years, 8 months ago (2013-04-12 03:13:24 UTC) #3
ramant (doing other things)
https://codereview.chromium.org/13834009/diff/1/net/http/http_network_transaction_spdy2_unittest.cc File net/http/http_network_transaction_spdy2_unittest.cc (right): https://codereview.chromium.org/13834009/diff/1/net/http/http_network_transaction_spdy2_unittest.cc#newcode11302 net/http/http_network_transaction_spdy2_unittest.cc:11302: // session. Verify that new url's from the same ...
7 years, 8 months ago (2013-04-12 03:23:09 UTC) #4
ramant (doing other things)
Hi Ryan and Jim, Was talking with Jim to make the code behave as before. ...
7 years, 8 months ago (2013-04-12 05:48:17 UTC) #5
ramant (doing other things)
Hi Ryan and Jim, Please take another look. Fixed the comments from Ryan. thanks raman
7 years, 8 months ago (2013-04-13 21:41:21 UTC) #6
Ryan Hamilton
To facilitate later readers of the CL, can you clean up the description? * Make ...
7 years, 8 months ago (2013-04-14 02:21:46 UTC) #7
ramant (doing other things)
PTAL. thanks. https://codereview.chromium.org/13834009/diff/52003/net/spdy/spdy_session.cc File net/spdy/spdy_session.cc (right): https://codereview.chromium.org/13834009/diff/52003/net/spdy/spdy_session.cc#newcode480 net/spdy/spdy_session.cc:480: UMA_HISTOGRAM_COUNTS("Net.SpdySession.InitAndError.BytesRead", bytes_read_); On 2013/04/14 02:21:46, Ryan Hamilton ...
7 years, 8 months ago (2013-04-16 19:12:23 UTC) #8
Ryan Hamilton
lgtm https://codereview.chromium.org/13834009/diff/63001/net/spdy/spdy_session.cc File net/spdy/spdy_session.cc (right): https://codereview.chromium.org/13834009/diff/63001/net/spdy/spdy_session.cc#newcode1188 net/spdy/spdy_session.cc:1188: UMA_HISTOGRAM_SPARSE_SLOWLY("Net.SpdySession.ClosedOnError.Error", -err); jar: how slowly is slowly? https://codereview.chromium.org/13834009/diff/63001/net/spdy/spdy_session.cc#newcode1188 ...
7 years, 8 months ago (2013-04-16 19:54:47 UTC) #9
ramant (doing other things)
https://codereview.chromium.org/13834009/diff/63001/net/spdy/spdy_session.cc File net/spdy/spdy_session.cc (right): https://codereview.chromium.org/13834009/diff/63001/net/spdy/spdy_session.cc#newcode1188 net/spdy/spdy_session.cc:1188: UMA_HISTOGRAM_SPARSE_SLOWLY("Net.SpdySession.ClosedOnError.Error", -err); On 2013/04/16 19:54:47, Ryan Hamilton wrote: > ...
7 years, 8 months ago (2013-04-16 21:45:15 UTC) #10
jar (doing other things)
lgtm
7 years, 8 months ago (2013-04-17 00:16:37 UTC) #11
ramant (doing other things)
7 years, 8 months ago (2013-04-17 06:12:34 UTC) #12
Message was sent while issue was closed.
Committed patchset #8 manually as r194540 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698