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

Issue 12224066: Fix UrlFetcher upload retry handling. (Closed)

Created:
7 years, 10 months ago by rmsousa
Modified:
7 years, 9 months ago
Reviewers:
hashimoto, mmenke, mattm
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org, Joao da Silva
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Fix UrlFetcher upload retry handling. For static content, we need to store the content, and create UploadDataStreams on demand (so we basically have to have separate handling for static content and SetUploadDataStream) For SetUploadDataStream, we either leave it as is but forbid it to be used with retry enabled (the approach on this CL), or the signature must be changed to take an UploadDataStreamFactory rather than a simple UploadDataStream. BUG=175038

Patch Set 1 #

Total comments: 4

Patch Set 2 : Add DCHEC #

Patch Set 3 : Check is_chunked_upload_ explicitly #

Patch Set 4 : Explicitly forbid retries for chunked uploads #

Total comments: 2

Patch Set 5 : Revert http://crrev.com/178535 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+70 lines, -114 lines) Patch
M net/url_request/test_url_fetcher_factory.h View 1 2 3 4 3 chunks +0 lines, -9 lines 0 comments Download
M net/url_request/test_url_fetcher_factory.cc View 1 2 3 4 2 chunks +0 lines, -7 lines 0 comments Download
M net/url_request/url_fetcher.h View 1 2 3 4 3 chunks +3 lines, -11 lines 0 comments Download
M net/url_request/url_fetcher_core.h View 1 2 3 4 2 chunks +1 line, -3 lines 0 comments Download
M net/url_request/url_fetcher_core.cc View 1 2 3 4 4 chunks +13 lines, -33 lines 1 comment Download
M net/url_request/url_fetcher_impl.h View 1 2 3 4 1 chunk +0 lines, -3 lines 0 comments Download
M net/url_request/url_fetcher_impl.cc View 1 2 3 4 2 chunks +0 lines, -7 lines 0 comments Download
M net/url_request/url_fetcher_impl_unittest.cc View 1 2 3 4 4 chunks +53 lines, -41 lines 0 comments Download

Messages

Total messages: 20 (0 generated)
rmsousa
Hi Matt, I don't know what's the exact use case for SetUploadDataStream, so I tried ...
7 years, 10 months ago (2013-02-08 05:03:59 UTC) #1
mattm
On 2013/02/08 05:03:59, rmsousa wrote: > Hi Matt, > > I don't know what's the ...
7 years, 10 months ago (2013-02-09 02:37:24 UTC) #2
mmenke
Wonder how important automatically retrying on 5xx errors is for POSTS. Looks like there are ...
7 years, 10 months ago (2013-02-11 17:31:35 UTC) #3
mmenke
On 2013/02/11 17:31:35, Matt Menke wrote: > Wonder how important automatically retrying on 5xx errors ...
7 years, 10 months ago (2013-02-11 17:34:32 UTC) #4
rmsousa
On 2013/02/11 17:34:32, mmenke wrote: > On 2013/02/11 17:31:35, Matt Menke wrote: > > Wonder ...
7 years, 10 months ago (2013-02-11 22:57:36 UTC) #5
rmsousa
https://codereview.chromium.org/12224066/diff/1/net/url_request/url_fetcher_core.cc File net/url_request/url_fetcher_core.cc (right): https://codereview.chromium.org/12224066/diff/1/net/url_request/url_fetcher_core.cc#newcode766 net/url_request/url_fetcher_core.cc:766: } On 2013/02/11 17:31:35, mmenke wrote: > This isn't ...
7 years, 10 months ago (2013-02-11 22:57:54 UTC) #6
mmenke
> > One alternative approach would be to re-used the UploadDataStream for both > > ...
7 years, 10 months ago (2013-02-11 23:05:01 UTC) #7
rmsousa
> Right, so we'd either need to reclaim it, or have a way to maintain ...
7 years, 10 months ago (2013-02-12 00:18:28 UTC) #8
mmenke
On 2013/02/12 00:18:28, rmsousa wrote: > > Right, so we'd either need to reclaim it, ...
7 years, 10 months ago (2013-02-12 00:26:39 UTC) #9
rmsousa
> We have exclusive ownership of the URLRequest. Only external class that can > touch ...
7 years, 10 months ago (2013-02-12 02:06:21 UTC) #10
mmenke
On 2013/02/12 02:06:21, rmsousa wrote: > > We have exclusive ownership of the URLRequest. Only ...
7 years, 10 months ago (2013-02-12 03:37:30 UTC) #11
mmenke
On 2013/02/12 02:06:21, rmsousa wrote: > > We have exclusive ownership of the URLRequest. Only ...
7 years, 10 months ago (2013-02-12 03:40:42 UTC) #12
hashimoto
On 2013/02/12 00:18:28, rmsousa wrote: > > Right, so we'd either need to reclaim it, ...
7 years, 10 months ago (2013-02-12 06:51:45 UTC) #13
rmsousa
On 2013/02/12 03:40:42, mmenke wrote: > On 2013/02/12 02:06:21, rmsousa wrote: > > > We ...
7 years, 10 months ago (2013-02-12 23:03:12 UTC) #14
mmenke
On 2013/02/12 23:03:12, rmsousa wrote: > On 2013/02/12 03:40:42, mmenke wrote: > > On 2013/02/12 ...
7 years, 10 months ago (2013-02-13 02:54:47 UTC) #15
mattm
On 2013/02/13 02:54:47, mmenke wrote: > On 2013/02/12 23:03:12, rmsousa wrote: > > On 2013/02/12 ...
7 years, 10 months ago (2013-02-13 03:06:05 UTC) #16
Joao da Silva
lgtm https://codereview.chromium.org/12224066/diff/7002/net/url_request/url_fetcher_core.cc File net/url_request/url_fetcher_core.cc (right): https://codereview.chromium.org/12224066/diff/7002/net/url_request/url_fetcher_core.cc#newcode349 net/url_request/url_fetcher_core.cc:349: DCHECK_EQ(max_retries_on_network_changes_, 0); Same for max_retries_on_network_changes_ https://codereview.chromium.org/12224066/diff/7002/net/url_request/url_fetcher_core.cc#newcode368 net/url_request/url_fetcher_core.cc:368: DCHECK_EQ(max_retries_on_network_changes_, ...
7 years, 10 months ago (2013-02-13 10:53:18 UTC) #17
Joao da Silva
Please ignore that lgtm, it was a misbehaved mouse :-) I just wanted to chime ...
7 years, 10 months ago (2013-02-13 10:55:58 UTC) #18
rmsousa
An automatic revert won't work - there's some stuff built on top of the change ...
7 years, 10 months ago (2013-02-13 23:05:08 UTC) #19
rmsousa
7 years, 10 months ago (2013-02-13 23:15:51 UTC) #20
Withdrawn, Matt already sent a revert for review:
https://codereview.chromium.org/12261025

On 2013/02/13 23:05:08, rmsousa wrote:
> An automatic revert won't work - there's some stuff built on top of the change
> (even if it doesn't exactly use the feature that the change introduced)
> I've manually reverted the change, trying to preserve the unrelated fixes
built
> on top of it (mostly making some conditions/CHECKs more lax). I also kept the
> unit test for the retry behavior.
> Please take a look.
> (note: I don't have committer status, so once this is in trunk someone with
the
> appropriate superpowers will need to merge this back to M26)
> 
>
https://codereview.chromium.org/12224066/diff/16001/net/url_request/url_fetch...
> File net/url_request/url_fetcher_core.cc (left):
> 
>
https://codereview.chromium.org/12224066/diff/16001/net/url_request/url_fetch...
> net/url_request/url_fetcher_core.cc:754: DCHECK(is_chunked_upload_ ||
> upload_content_);
> One of the changes that came after http://crrev.com/178535 was to explicitly
> allow empty content with empty content type (http://crrev.com/181039). To
> preserve that, I removed this DCHECK entirely rather than reverting to the old
> one.

Powered by Google App Engine
This is Rietveld 408576698