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

Issue 554743004: Update AttachmentServiceImpl to retry attachment uploads. (Closed)

Created:
6 years, 3 months ago by maniscalco
Modified:
6 years, 3 months ago
Reviewers:
pavely
CC:
chromium-reviews, tim+watch_chromium.org, haitaol+watch_chromium.org, zea+watch_chromium.org, maniscalco+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Update AttachmentServiceImpl to retry attachment uploads. Add TaskQueue, a class that provides retry and backoff semantics for tasks. Used by AttachmentServiceImpl. AttachmentUploaderImpl and AttachmentDownloaderImpl now differentiate between transient and non-transient errors. Almost all errors are assumed to be transient. "403 Forbidden" is the exception and is returned by the sync server if attachment are disabled for the user. Transient errors encountered during attachment upload will be retried with exponential backoff (using TaskQueue and BackoffEntry). The idea is to consolidate retry logic at the AttachmentServiceImpl level. In a future CL, changes in network connectivity will affect retry and backoff. BUG=372622, 380437 Committed: https://crrev.com/c51cb78e34848822057a669f3ed1b69b7b2bd266 Cr-Commit-Position: refs/heads/master@{#294195}

Patch Set 1 #

Patch Set 2 : Self-review. #

Patch Set 3 : Self-review. #

Patch Set 4 : Improve comments. #

Patch Set 5 : Check ShouldDispatch in Dispatch. #

Total comments: 14

Patch Set 6 : Apply CR feedback from pavely. #

Patch Set 7 : Merge with master and improve a TODO comment. #

Patch Set 8 : Merge with master. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+696 lines, -139 lines) Patch
M chrome/browser/sync/profile_sync_components_factory_impl.cc View 1 2 3 4 5 6 7 1 chunk +10 lines, -2 lines 0 comments Download
M components/sync_driver/generic_change_processor_unittest.cc View 1 2 3 4 5 6 7 1 chunk +3 lines, -1 line 0 comments Download
M sync/internal_api/attachments/attachment_downloader_impl.cc View 3 chunks +14 lines, -7 lines 0 comments Download
M sync/internal_api/attachments/attachment_downloader_impl_unittest.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M sync/internal_api/attachments/attachment_service_impl.cc View 1 2 3 4 5 6 7 7 chunks +56 lines, -36 lines 0 comments Download
M sync/internal_api/attachments/attachment_service_impl_unittest.cc View 1 2 3 4 5 6 7 4 chunks +60 lines, -62 lines 0 comments Download
M sync/internal_api/attachments/attachment_uploader_impl.cc View 1 2 3 4 5 6 3 chunks +18 lines, -11 lines 0 comments Download
M sync/internal_api/attachments/attachment_uploader_impl_unittest.cc View 3 chunks +39 lines, -2 lines 0 comments Download
A + sync/internal_api/attachments/task_queue.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
A sync/internal_api/attachments/task_queue_unittest.cc View 1 2 3 4 5 1 chunk +197 lines, -0 lines 0 comments Download
M sync/internal_api/public/attachments/attachment_downloader.h View 1 chunk +1 line, -0 lines 0 comments Download
M sync/internal_api/public/attachments/attachment_service_impl.h View 1 2 3 4 5 6 7 5 chunks +20 lines, -14 lines 0 comments Download
M sync/internal_api/public/attachments/attachment_uploader.h View 1 chunk +1 line, -0 lines 0 comments Download
A sync/internal_api/public/attachments/task_queue.h View 1 2 3 4 5 1 chunk +270 lines, -0 lines 0 comments Download
M sync/sync.gyp View 2 chunks +2 lines, -0 lines 0 comments Download
M sync/sync_tests.gypi View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 14 (4 generated)
maniscalco
Pavel, would you please review this change? I plan to integration with network connectivity monitoring ...
6 years, 3 months ago (2014-09-08 22:02:09 UTC) #2
pavely
https://codereview.chromium.org/554743004/diff/80001/sync/internal_api/attachments/attachment_service_impl.cc File sync/internal_api/attachments/attachment_service_impl.cc (right): https://codereview.chromium.org/554743004/diff/80001/sync/internal_api/attachments/attachment_service_impl.cc#newcode247 sync/internal_api/attachments/attachment_service_impl.cc:247: break; You have to call exactly one of three ...
6 years, 3 months ago (2014-09-09 19:42:24 UTC) #3
pavely
https://codereview.chromium.org/554743004/diff/80001/sync/internal_api/attachments/attachment_uploader_impl.cc File sync/internal_api/attachments/attachment_uploader_impl.cc (right): https://codereview.chromium.org/554743004/diff/80001/sync/internal_api/attachments/attachment_uploader_impl.cc#newcode152 sync/internal_api/attachments/attachment_uploader_impl.cc:152: } On 2014/09/09 19:42:23, pavely wrote: > We discussed ...
6 years, 3 months ago (2014-09-09 19:47:42 UTC) #4
maniscalco
Thanks for the feedback! PTAL. https://codereview.chromium.org/554743004/diff/80001/sync/internal_api/attachments/attachment_service_impl.cc File sync/internal_api/attachments/attachment_service_impl.cc (right): https://codereview.chromium.org/554743004/diff/80001/sync/internal_api/attachments/attachment_service_impl.cc#newcode247 sync/internal_api/attachments/attachment_service_impl.cc:247: break; On 2014/09/09 19:42:23, ...
6 years, 3 months ago (2014-09-09 21:15:44 UTC) #5
pavely
lgtm
6 years, 3 months ago (2014-09-10 00:11:43 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/maniscalco@chromium.org/554743004/120001
6 years, 3 months ago (2014-09-10 16:09:36 UTC) #8
commit-bot: I haz the power
Try jobs failed on following builders: linux_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/linux_gpu/builds/65063) mac_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/mac_gpu/builds/54080) win_gpu ...
6 years, 3 months ago (2014-09-10 16:14:10 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/maniscalco@chromium.org/554743004/140001
6 years, 3 months ago (2014-09-10 17:30:12 UTC) #12
commit-bot: I haz the power
Committed patchset #8 (id:140001) as 81d9236b2364168ac2c427bd1b135a6d933bf52a
6 years, 3 months ago (2014-09-10 18:31:22 UTC) #13
commit-bot: I haz the power
6 years, 3 months ago (2014-09-10 18:37:59 UTC) #14
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/c51cb78e34848822057a669f3ed1b69b7b2bd266
Cr-Commit-Position: refs/heads/master@{#294195}

Powered by Google App Engine
This is Rietveld 408576698