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

Issue 2748103014: Allow the initial request to take over failed parallel requests. (Closed)

Created:
3 years, 9 months ago by qinmin
Modified:
3 years, 9 months ago
CC:
chromium-reviews, asanka, jam, darin-cc_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Allow the initial request to take over failed parallel requests. When a parallel request fails, DownloadFileImpl will send an error and cause download to be interrupted. This could cause a potential problem: If a server always fail addtional requests, these requests will cause the download to interrupt. As a result, the initial request and the download can go nowhere. This CL addresses the issue by allowing the initial request to continue, if it is still alive and can cover the slice to be downloaded by the failed request. If the initial request cannot download the slice left by the parallel request, an error will be sent. Will add a test once https://codereview.chromium.org/2742093002/ lands BUG=644352 Review-Url: https://codereview.chromium.org/2748103014 Cr-Commit-Position: refs/heads/master@{#459005} Committed: https://chromium.googlesource.com/chromium/src/+/6dbfc80be8169ac5e0ffc7f051432ab8681de7bb

Patch Set 1 #

Total comments: 25

Patch Set 2 : address comments #

Patch Set 3 : rebase and fix a case if file contains holes #

Patch Set 4 : rebase again #

Unified diffs Side-by-side diffs Delta from patch set Stats (+91 lines, -12 lines) Patch
M content/browser/download/download_file_impl.h View 1 2 3 1 chunk +8 lines, -0 lines 0 comments Download
M content/browser/download/download_file_impl.cc View 1 2 3 2 chunks +83 lines, -12 lines 0 comments Download

Messages

Total messages: 28 (17 generated)
qinmin
PTAL
3 years, 9 months ago (2017-03-17 22:28:02 UTC) #2
xingliu
https://codereview.chromium.org/2748103014/diff/1/content/browser/download/download_file_impl.cc File content/browser/download/download_file_impl.cc (right): https://codereview.chromium.org/2748103014/diff/1/content/browser/download/download_file_impl.cc#newcode517 content/browser/download/download_file_impl.cc:517: auto initial_source_stream = source_streams_.find(save_info_->offset); What if the error is ...
3 years, 9 months ago (2017-03-18 22:27:34 UTC) #3
qinmin
https://codereview.chromium.org/2748103014/diff/1/content/browser/download/download_file_impl.cc File content/browser/download/download_file_impl.cc (right): https://codereview.chromium.org/2748103014/diff/1/content/browser/download/download_file_impl.cc#newcode517 content/browser/download/download_file_impl.cc:517: auto initial_source_stream = source_streams_.find(save_info_->offset); On 2017/03/18 22:27:34, xingliu wrote: ...
3 years, 9 months ago (2017-03-20 20:59:21 UTC) #4
xingliu
lgtm with nit%. Not in this CL, but maybe something to consider. We probably can ...
3 years, 9 months ago (2017-03-20 22:33:33 UTC) #5
xingliu
Sorry for a half done comment. https://codereview.chromium.org/2748103014/diff/1/content/browser/download/download_file_impl.cc File content/browser/download/download_file_impl.cc (right): https://codereview.chromium.org/2748103014/diff/1/content/browser/download/download_file_impl.cc#newcode553 content/browser/download/download_file_impl.cc:553: reason, TotalBytesReceived(), base::Passed(&hash_state))); ...
3 years, 9 months ago (2017-03-20 22:35:10 UTC) #6
David Trainor- moved to gerrit
https://codereview.chromium.org/2748103014/diff/1/content/browser/download/download_file_impl.cc File content/browser/download/download_file_impl.cc (right): https://codereview.chromium.org/2748103014/diff/1/content/browser/download/download_file_impl.cc#newcode517 content/browser/download/download_file_impl.cc:517: auto initial_source_stream = source_streams_.find(save_info_->offset); Should we just call this ...
3 years, 9 months ago (2017-03-21 17:00:17 UTC) #7
xingliu
Some discussion. https://codereview.chromium.org/2748103014/diff/1/content/browser/download/download_file_impl.cc File content/browser/download/download_file_impl.cc (right): https://codereview.chromium.org/2748103014/diff/1/content/browser/download/download_file_impl.cc#newcode533 content/browser/download/download_file_impl.cc:533: DCHECK_EQ(stream.second->bytes_written(), 0); On 2017/03/21 17:00:16, David Trainor-ping ...
3 years, 9 months ago (2017-03-21 17:48:04 UTC) #8
qinmin
https://codereview.chromium.org/2748103014/diff/1/content/browser/download/download_file_impl.cc File content/browser/download/download_file_impl.cc (right): https://codereview.chromium.org/2748103014/diff/1/content/browser/download/download_file_impl.cc#newcode517 content/browser/download/download_file_impl.cc:517: auto initial_source_stream = source_streams_.find(save_info_->offset); On 2017/03/21 17:00:16, David Trainor-ping ...
3 years, 9 months ago (2017-03-21 19:29:17 UTC) #9
David Trainor- moved to gerrit
Have some replies inline, but lgtm. https://codereview.chromium.org/2748103014/diff/1/content/browser/download/download_file_impl.cc File content/browser/download/download_file_impl.cc (right): https://codereview.chromium.org/2748103014/diff/1/content/browser/download/download_file_impl.cc#newcode528 content/browser/download/download_file_impl.cc:528: // The initial ...
3 years, 9 months ago (2017-03-22 03:10:55 UTC) #10
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/2748103014/60001
3 years, 9 months ago (2017-03-23 04:36:58 UTC) #25
commit-bot: I haz the power
3 years, 9 months ago (2017-03-23 04:41:28 UTC) #28
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/6dbfc80be8169ac5e0ffc7f05143...

Powered by Google App Engine
This is Rietveld 408576698