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

Issue 2319343004: Makes migration on write error asynchronous to avoid reentrancy issues (Closed)

Created:
4 years, 3 months ago by Jana
Modified:
4 years, 3 months ago
Reviewers:
Ryan Hamilton
CC:
chromium-reviews, cbentzel+watch_chromium.org, Jo Kulik, Fan Yang
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

This CL refactors the code for migration on write error, making it asynchronous to avoid reentrancyissues. Also simplifies some methods in QuicStreamFactory. BUG=646145 Committed: https://crrev.com/9f3037153a2feb63bbaeaf07ab35c8ff9a3096ad Cr-Commit-Position: refs/heads/master@{#418128}

Patch Set 1 #

Patch Set 2 : Async tests added. #

Patch Set 3 : More betterment and testing. #

Patch Set 4 : Cleaning up. #

Total comments: 27

Patch Set 5 : responses to comments #

Total comments: 6

Patch Set 6 : Avoids multiple tasks from repeating packet write. #

Total comments: 2

Patch Set 7 : Addesses comments. #

Patch Set 8 : added tests for async write before notification and fixed call to OnCanWrite #

Total comments: 36

Patch Set 9 : rebased #

Patch Set 10 : Addressed comments and removed use of write_pending_. #

Patch Set 11 : Do not try to migrate on write error if migration is disabled. #

Patch Set 12 : fixed type #

Patch Set 13 : Fixed typo. #

Total comments: 4

Patch Set 14 : comments addressed. #

Patch Set 15 : synced and rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+642 lines, -203 lines) Patch
M net/quic/chromium/mock_network_change_notifier.h View 1 2 3 4 1 chunk +10 lines, -0 lines 0 comments Download
M net/quic/chromium/mock_network_change_notifier.cc View 1 2 1 chunk +13 lines, -3 lines 0 comments Download
M net/quic/chromium/quic_chromium_client_session.h View 1 2 3 4 5 6 7 8 9 2 chunks +21 lines, -11 lines 0 comments Download
M net/quic/chromium/quic_chromium_client_session.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +95 lines, -19 lines 0 comments Download
M net/quic/chromium/quic_chromium_client_session_test.cc View 1 2 5 chunks +15 lines, -57 lines 0 comments Download
M net/quic/chromium/quic_chromium_packet_writer.h View 1 2 3 4 5 6 3 chunks +5 lines, -4 lines 0 comments Download
M net/quic/chromium/quic_chromium_packet_writer.cc View 1 2 5 6 3 chunks +10 lines, -10 lines 0 comments Download
M net/quic/chromium/quic_stream_factory.h View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +29 lines, -22 lines 0 comments Download
M net/quic/chromium/quic_stream_factory.cc View 1 2 3 4 5 6 7 8 7 chunks +27 lines, -34 lines 0 comments Download
M net/quic/chromium/quic_stream_factory_test.cc View 1 2 3 4 5 6 7 8 9 22 chunks +417 lines, -43 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 36 (11 generated)
Jana
This CL does not yet include a pause period between migration trigger and completion -- ...
4 years, 3 months ago (2016-09-10 04:26:33 UTC) #4
Ryan Hamilton
Have to go run some errands, but here are some partial comments. I think there's ...
4 years, 3 months ago (2016-09-10 16:29:47 UTC) #5
Ryan Hamilton
No need to do this, but it looks like you could land the QuicStreamFactory changes ...
4 years, 3 months ago (2016-09-10 16:40:35 UTC) #6
Jana
Thanks, Ryan. Comments addressed. https://codereview.chromium.org/2319343004/diff/60001/net/quic/chromium/mock_network_change_notifier.h File net/quic/chromium/mock_network_change_notifier.h (right): https://codereview.chromium.org/2319343004/diff/60001/net/quic/chromium/mock_network_change_notifier.h#newcode30 net/quic/chromium/mock_network_change_notifier.h:30: void QueueNetworkMadeDefault(NetworkChangeNotifier::NetworkHandle network); On 2016/09/10 ...
4 years, 3 months ago (2016-09-10 23:08:31 UTC) #7
Jana
Oh -- and I did think about it, but it's tricky to just do the ...
4 years, 3 months ago (2016-09-10 23:09:52 UTC) #8
Jana
I've cleaned up the code and (I think) made it more readable. https://codereview.chromium.org/2319343004/diff/60001/net/quic/chromium/quic_chromium_client_session.cc File net/quic/chromium/quic_chromium_client_session.cc ...
4 years, 3 months ago (2016-09-11 05:30:47 UTC) #9
Ryan Hamilton
https://codereview.chromium.org/2319343004/diff/80001/net/quic/chromium/quic_chromium_client_session.cc File net/quic/chromium/quic_chromium_client_session.cc (right): https://codereview.chromium.org/2319343004/diff/80001/net/quic/chromium/quic_chromium_client_session.cc#newcode1004 net/quic/chromium/quic_chromium_client_session.cc:1004: // not write blocked. If there's only a write ...
4 years, 3 months ago (2016-09-11 15:38:42 UTC) #10
Jana
Thanks, Ryan, responses below. You may also want to look at the latest version of ...
4 years, 3 months ago (2016-09-11 18:32:30 UTC) #11
Ryan Hamilton
https://codereview.chromium.org/2319343004/diff/100001/net/quic/chromium/quic_chromium_client_session.cc File net/quic/chromium/quic_chromium_client_session.cc (right): https://codereview.chromium.org/2319343004/diff/100001/net/quic/chromium/quic_chromium_client_session.cc#newcode1005 net/quic/chromium/quic_chromium_client_session.cc:1005: connection()->SendPing(); Maybe I'm not looking in the right place, ...
4 years, 3 months ago (2016-09-11 19:24:12 UTC) #12
Jana
https://codereview.chromium.org/2319343004/diff/100001/net/quic/chromium/quic_chromium_client_session.cc File net/quic/chromium/quic_chromium_client_session.cc (right): https://codereview.chromium.org/2319343004/diff/100001/net/quic/chromium/quic_chromium_client_session.cc#newcode1005 net/quic/chromium/quic_chromium_client_session.cc:1005: connection()->SendPing(); On 2016/09/11 19:24:12, Ryan Hamilton wrote: > Maybe ...
4 years, 3 months ago (2016-09-11 19:44:05 UTC) #13
Jana
On 2016/09/11 19:44:05, Jana wrote: > https://codereview.chromium.org/2319343004/diff/100001/net/quic/chromium/quic_chromium_client_session.cc > File net/quic/chromium/quic_chromium_client_session.cc (right): > > https://codereview.chromium.org/2319343004/diff/100001/net/quic/chromium/quic_chromium_client_session.cc#newcode1005 > ...
4 years, 3 months ago (2016-09-11 20:15:02 UTC) #14
Ryan Hamilton
On 2016/09/11 20:15:02, Jana wrote: > On 2016/09/11 19:44:05, Jana wrote: > > > https://codereview.chromium.org/2319343004/diff/100001/net/quic/chromium/quic_chromium_client_session.cc ...
4 years, 3 months ago (2016-09-11 20:41:10 UTC) #15
Ryan Hamilton
I think this is looking quite good. I need to head out and will be ...
4 years, 3 months ago (2016-09-11 20:44:25 UTC) #16
Jana
THanks, Ryan. I added a call to OnCanWrite(), and changed the delegate shouldwriteblock to a ...
4 years, 3 months ago (2016-09-11 21:37:40 UTC) #17
Jana
Added tests for async write before DISCONNECTED and MADE_DEFAULT notifications, and fixed code to only ...
4 years, 3 months ago (2016-09-11 23:00:46 UTC) #18
Ryan Hamilton
OK, this looks great. I've not yet looked at the tests, but I think the ...
4 years, 3 months ago (2016-09-12 00:52:18 UTC) #19
Ryan Hamilton
Tests looking great! https://codereview.chromium.org/2319343004/diff/140001/net/quic/chromium/quic_chromium_client_session.cc File net/quic/chromium/quic_chromium_client_session.cc (right): https://codereview.chromium.org/2319343004/diff/140001/net/quic/chromium/quic_chromium_client_session.cc#newcode999 net/quic/chromium/quic_chromium_client_session.cc:999: return; You can take this or ...
4 years, 3 months ago (2016-09-12 01:32:58 UTC) #20
Jana
Thanks Ryan -- comments addressed. PTAL. https://codereview.chromium.org/2319343004/diff/140001/net/quic/chromium/quic_chromium_client_session.cc File net/quic/chromium/quic_chromium_client_session.cc (right): https://codereview.chromium.org/2319343004/diff/140001/net/quic/chromium/quic_chromium_client_session.cc#newcode969 net/quic/chromium/quic_chromium_client_session.cc:969: migration_pending_ = true; ...
4 years, 3 months ago (2016-09-12 21:08:03 UTC) #22
Ryan Hamilton
lgtm https://codereview.chromium.org/2319343004/diff/240001/net/quic/chromium/quic_chromium_client_session.cc File net/quic/chromium/quic_chromium_client_session.cc (right): https://codereview.chromium.org/2319343004/diff/240001/net/quic/chromium/quic_chromium_client_session.cc#newcode974 net/quic/chromium/quic_chromium_client_session.cc:974: } I'm guessing we don't have tests for ...
4 years, 3 months ago (2016-09-12 22:13:55 UTC) #23
Jana
Thanks much, Ryan. Responses inline. https://codereview.chromium.org/2319343004/diff/240001/net/quic/chromium/quic_chromium_client_session.cc File net/quic/chromium/quic_chromium_client_session.cc (right): https://codereview.chromium.org/2319343004/diff/240001/net/quic/chromium/quic_chromium_client_session.cc#newcode974 net/quic/chromium/quic_chromium_client_session.cc:974: } On 2016/09/12 22:13:55, ...
4 years, 3 months ago (2016-09-12 22:20:39 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2319343004/280001
4 years, 3 months ago (2016-09-12 22:27:32 UTC) #27
commit-bot: I haz the power
Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_swarming_rel/builds/29327)
4 years, 3 months ago (2016-09-12 23:43:11 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2319343004/280001
4 years, 3 months ago (2016-09-12 23:56:54 UTC) #32
commit-bot: I haz the power
Committed patchset #15 (id:280001)
4 years, 3 months ago (2016-09-13 01:10:43 UTC) #34
commit-bot: I haz the power
4 years, 3 months ago (2016-09-13 01:12:54 UTC) #36
Message was sent while issue was closed.
Patchset 15 (id:??) landed as
https://crrev.com/9f3037153a2feb63bbaeaf07ab35c8ff9a3096ad
Cr-Commit-Position: refs/heads/master@{#418128}

Powered by Google App Engine
This is Rietveld 408576698