Chromium Code Reviews
Help | Chromium Project | Sign in
(87)

Issue 2487001: Request Throttler : Exponential back-off (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
4 years, 12 months ago by malavv
Modified:
4 years ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org
Visibility:
Public.

Description

This CL will introduce a new way to do exponential back-off on failure within Chromium. It is a network level implementation and should constitute a good enough bottleneck to manage every outgoing http request.

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 32

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : Garbage collecting entries + url_id include path #

Patch Set 6 : Support for X-Retry-After + fix race conditions #

Patch Set 7 : '' #

Total comments: 13

Patch Set 8 : Modification of net.gyp file in order to include my changes. #

Patch Set 9 : Fixed smelly code + some code review tips #

Total comments: 36

Patch Set 10 : Many changes that were propose 6 of june #

Patch Set 11 : '' #

Total comments: 32

Patch Set 12 : Fixed code review stuff and race conditions. #

Patch Set 13 : Remove apparently unnecessairy Autolock() and added DCHECK for that #

Patch Set 14 : Same but that passes LINT #

Patch Set 15 : Upload without locks and with thread check. #

Total comments: 13

Patch Set 16 : Correction for this morning code review. 6/15/2010 #

Total comments: 34

Patch Set 17 : '' #

Total comments: 43

Patch Set 18 : '' #

Total comments: 27

Patch Set 19 : '' #

Total comments: 4

Patch Set 20 : Corrected two nits #

Total comments: 22

Patch Set 21 : Correction of details pointed by Joi #

Patch Set 22 : Added explicit conversion #

Patch Set 23 : Fixed problem with non-creation of transaction on failure + corrected compile & unittest #

Total comments: 87

Patch Set 24 : Changed name to be more relevant and corrected errors pointed out by Eric #

Patch Set 25 : It's been so long now I was 1k revision behind I updated the client and resolved conflict. #

Patch Set 26 : missing piece #

Patch Set 27 : Had problem with my client sync #

Patch Set 28 : Fixed unit test to pass try bots #

Total comments: 54

Patch Set 29 : Fixed changes suggested by Eric Roman, adjusted nits around code. #

Total comments: 20

Patch Set 30 : Corrected final nits #

Patch Set 31 : Sync with head #

Patch Set 32 : Corrected a flaky test due to having 2 implementation of request throttling #

Unified diffs Side-by-side diffs Delta from patch set Stats (+851 lines, -10 lines) Patch
M chrome/common/net/url_fetcher_unittest.cc View 23 24 25 26 27 28 29 30 31 1 chunk +1 line, -1 line 0 comments Download
M net/base/net_error_list.h View 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 chunk +4 lines, -0 lines 0 comments Download
M net/net.gyp View 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 2 chunks +9 lines, -0 lines 0 comments Download
A net/request_throttler/request_throttler_entry.h View 24 25 26 27 28 1 chunk +104 lines, -0 lines 0 comments Download
A net/request_throttler/request_throttler_entry.cc View 24 25 26 27 28 1 chunk +133 lines, -0 lines 0 comments Download
A net/request_throttler/request_throttler_entry_interface.h View 24 25 26 27 28 1 chunk +33 lines, -0 lines 0 comments Download
A net/request_throttler/request_throttler_header_adapter.h View 24 25 26 27 28 1 chunk +28 lines, -0 lines 0 comments Download
A net/request_throttler/request_throttler_header_adapter.cc View 24 25 26 27 28 29 1 chunk +21 lines, -0 lines 0 comments Download
A net/request_throttler/request_throttler_header_interface.h View 24 25 26 27 28 1 chunk +24 lines, -0 lines 0 comments Download
A net/request_throttler/request_throttler_manager.h View 24 25 26 27 28 29 1 chunk +79 lines, -0 lines 0 comments Download
A net/request_throttler/request_throttler_manager.cc View 24 25 26 27 28 29 1 chunk +85 lines, -0 lines 0 comments Download
A net/request_throttler/request_throttler_unittest.cc View 24 25 26 27 28 29 1 chunk +301 lines, -0 lines 0 comments Download
M net/url_request/url_request_http_job.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 2 chunks +5 lines, -0 lines 0 comments Download
M net/url_request/url_request_http_job.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 4 chunks +24 lines, -9 lines 0 comments Download
Commit: CQ not working?

Messages

Total messages: 38 (0 generated)
Jói
http://codereview.chromium.org/2487001/diff/6001/7001 File net/url_request/network_safety.cc (right): http://codereview.chromium.org/2487001/diff/6001/7001#newcode1 net/url_request/network_safety.cc:1: // Copyright (c) 2006-2009 The Chromium Authors. All rights ...
4 years, 12 months ago (2010-06-02 18:48:16 UTC) #1
malavv
I have made adjustment you recommended and inserted some comments about what should we use ...
4 years, 12 months ago (2010-06-02 20:43:04 UTC) #2
Jói
http://codereview.chromium.org/2487001/diff/6001/7001 File net/url_request/network_safety.cc (right): http://codereview.chromium.org/2487001/diff/6001/7001#newcode110 net/url_request/network_safety.cc:110: NetworkSafetyEntry* NetworkSafetyManager::RegisterHost > I will in my correction make ...
4 years, 12 months ago (2010-06-02 22:18:48 UTC) #3
malavv
I have uploaded a unit test suit for my module.
4 years, 11 months ago (2010-06-08 19:18:20 UTC) #4
Jói
First round of comments, will look again when you're finished making the changes you mentioned ...
4 years, 11 months ago (2010-06-08 20:28:04 UTC) #5
malavv
I have fixed the comments I was talking about and have increase general readability of ...
4 years, 11 months ago (2010-06-08 21:51:03 UTC) #6
Jói
Some more quick comments based on the diff to the latest patch set. I will ...
4 years, 11 months ago (2010-06-09 17:57:08 UTC) #7
Jói
More comments. We might want to have a chat about some of them before I ...
4 years, 11 months ago (2010-06-09 18:33:55 UTC) #8
Jói
Adding Siggi as a reviewer since it looks like this may need to land while ...
4 years, 11 months ago (2010-06-09 19:59:33 UTC) #9
malavv
Hello Joi, and now Siggi. I just finish applying all the changes that you proposed ...
4 years, 11 months ago (2010-06-10 03:29:53 UTC) #10
malavv
Hi Siggi, I have completed rewriting my test for the new public interface and finished ...
4 years, 11 months ago (2010-06-10 20:02:56 UTC) #11
Jói
Looking better. Only had time to do a quick scan, will leave more details for ...
4 years, 11 months ago (2010-06-10 20:26:56 UTC) #12
siggi1
Some initial comments, let's have a chat on threading model and safety. http://codereview.chromium.org/2487001/diff/66002/45008 File net/network_safety/network_safety_manager.cc ...
4 years, 11 months ago (2010-06-11 13:06:09 UTC) #13
malavv
Fixed race conditions and initial code review stuff http://codereview.chromium.org/2487001/diff/66002/45003 File net/network_safety/network_safety_entry.cc (right): http://codereview.chromium.org/2487001/diff/66002/45003#newcode31 net/network_safety/network_safety_entry.cc:31: int64 ...
4 years, 11 months ago (2010-06-11 18:02:49 UTC) #14
malavv
Hi Siggi, I have resolved problems you pointed me and check for the real utility ...
4 years, 11 months ago (2010-06-14 17:17:50 UTC) #15
siggi1
Some additional comments, will keep going with a detailed review later this morning. http://codereview.chromium.org/2487001/diff/90003/109003 File ...
4 years, 11 months ago (2010-06-15 14:02:12 UTC) #16
Sigurður Ásgeirsson
looking good, still a few nits :). http://codereview.chromium.org/2487001/diff/117001/118003 File net/network_safety/network_safety_entry.cc (right): http://codereview.chromium.org/2487001/diff/117001/118003#newcode43 net/network_safety/network_safety_entry.cc:43: SaveState(); you ...
4 years, 11 months ago (2010-06-16 13:57:51 UTC) #17
malavv
- Did change the way that state and back-off value is kept in order to ...
4 years, 11 months ago (2010-06-16 17:25:34 UTC) #18
Sigurður Ásgeirsson
A few more nits. http://codereview.chromium.org/2487001/diff/126001/127001 File net/base/net_error_list.h (right): http://codereview.chromium.org/2487001/diff/126001/127001#newcode160 net/base/net_error_list.h:160: // request on a server ...
4 years, 11 months ago (2010-06-17 19:54:38 UTC) #19
malavv
Resolved issues pointed out by your last code review. Also tighten the interface of networkSafetyEntry ...
4 years, 11 months ago (2010-06-18 19:45:59 UTC) #20
Sigurður Ásgeirsson
looking better, getting close. http://codereview.chromium.org/2487001/diff/113002/96006 File net/network_safety/network_safety_entry.h (right): http://codereview.chromium.org/2487001/diff/113002/96006#newcode15 net/network_safety/network_safety_entry.h:15: using base::TimeTicks; It's not polite ...
4 years, 11 months ago (2010-06-22 14:43:47 UTC) #21
malavv
Thanks you Siggi for those code Review, I know that it is time consuming for ...
4 years, 11 months ago (2010-06-22 17:36:42 UTC) #22
Sigurður Ásgeirsson
Couple of nits, then I think this is ready for review by someone more familiar ...
4 years, 11 months ago (2010-06-22 17:56:53 UTC) #23
Jói
Just some nits now that I finally had time to take a last quick look. ...
4 years, 11 months ago (2010-06-30 10:43:35 UTC) #24
eroman
Some high level comments before I dive into nits: (a) Nice design document! Can this ...
4 years, 10 months ago (2010-07-21 07:31:57 UTC) #25
Jói
Thanks for a very thorough review Eric. We could change the name to RequestThrottler, that ...
4 years, 10 months ago (2010-07-21 20:28:54 UTC) #26
malavv
Hi Eric, I really appreciate the time you put into doing this code review, I ...
4 years, 10 months ago (2010-07-22 15:02:58 UTC) #27
malavv
Fixed issues pointed by Eroman. Also made document public: https://docs.google.com/document/edit?id=1oqOh6oRqnGP2yz0yETdaxKh5MhP5U4gXa-Jd0bAwLM8&hl=en# http://codereview.chromium.org/2487001/diff/138002/122011 File net/network_safety/network_safety_manager.cc (right): http://codereview.chromium.org/2487001/diff/138002/122011#newcode33 ...
4 years, 10 months ago (2010-07-22 15:35:58 UTC) #28
malavv
Hi Eric, Thanks again for the very thorough code review you gave me in the ...
4 years, 10 months ago (2010-07-27 16:14:43 UTC) #29
eroman
Thanks for making those changes. I think we are getting close now. (This is a ...
4 years, 10 months ago (2010-07-28 01:00:15 UTC) #30
Jói
Thanks again Eric for such a thorough review. One response to one of your comments, ...
4 years, 10 months ago (2010-07-28 15:08:17 UTC) #31
malavv
Thanks Eric for this code review. I sent you a mail this morning about the ...
4 years, 10 months ago (2010-07-28 15:58:53 UTC) #32
eroman
LGTM. My main remaining high level comment is about the singleton RequestThrottlingManager. We try very ...
4 years, 10 months ago (2010-07-29 23:03:50 UTC) #33
malavv
I corrected the changes you had requested. http://codereview.chromium.org/2487001/diff/205002/207007 File net/request_throttler/request_throttler_header_adapter.cc (right): http://codereview.chromium.org/2487001/diff/205002/207007#newcode9 net/request_throttler/request_throttler_header_adapter.cc:9: : response_header_(headers) ...
4 years, 10 months ago (2010-07-30 20:49:34 UTC) #34
eroman
Do you have anyone that can commit this for you? (if not I can land ...
4 years, 10 months ago (2010-08-02 23:44:18 UTC) #35
Jói
I can land this for Maxime. Cheers, Jói On Mon, Aug 2, 2010 at 7:44 ...
4 years, 10 months ago (2010-08-02 23:48:02 UTC) #36
Jói
(and I believe Maxime is planning to switch from singleton to a member of URLRequestContext ...
4 years, 10 months ago (2010-08-03 00:15:02 UTC) #37
eroman
4 years, 10 months ago (2010-08-03 00:35:44 UTC) #38
> and I believe Maxime is planning to switch from singleton to 
> a member of URLRequestContext as per your comment, in a 
> follow-up change)

Great!

So the follow-ups to this CL will be (a) Make sure we have a histogram to see
how often this gets hit (b) Switch from singleton to per-URLRequestContext
state.

LGTM.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld ec887be