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

Issue 868133004: Serialize reading and writing in the import history storage. (Closed)

Created:
5 years, 11 months ago by mtomasz
Modified:
5 years, 11 months ago
Reviewers:
hirono, Steve McKay
CC:
chromium-reviews, tfarina, rginda+watch_chromium.org, mtomasz+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Serialize reading and writing in the import history storage. Concurrently writing with multiple FileWriters causes broken files. This patch wraps both reading a writing with a queue made of chained promises. TEST=browser_tests: *ImportHistoryTest* BUG=None Committed: https://crrev.com/c51c835b762f3bd0c47b2b7ea47450f2ac1abfe6 Cr-Commit-Position: refs/heads/master@{#312999}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Added catch to write(). #

Patch Set 3 : Rebased. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+67 lines, -23 lines) Patch
M ui/file_manager/file_manager/background/js/import_history.js View 1 2 2 chunks +46 lines, -23 lines 0 comments Download
M ui/file_manager/file_manager/background/js/import_history_unittest.js View 1 2 1 chunk +21 lines, -0 lines 0 comments Download

Messages

Total messages: 23 (11 generated)
mtomasz
@smckay: PTAL.
5 years, 11 months ago (2015-01-23 22:35:46 UTC) #2
Steve McKay
Neat trick! I like it. LGTM
5 years, 11 months ago (2015-01-23 23:03:52 UTC) #4
hirono
https://codereview.chromium.org/868133004/diff/1/ui/file_manager/file_manager/background/js/import_history.js File ui/file_manager/file_manager/background/js/import_history.js (right): https://codereview.chromium.org/868133004/diff/1/ui/file_manager/file_manager/background/js/import_history.js#newcode751 ui/file_manager/file_manager/background/js/import_history.js:751: .then(this.writeRecord_.bind(this, record)); We should catch rejection here. Otherwise the ...
5 years, 11 months ago (2015-01-23 23:05:58 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/868133004/1
5 years, 11 months ago (2015-01-23 23:06:21 UTC) #8
mtomasz
https://codereview.chromium.org/868133004/diff/1/ui/file_manager/file_manager/background/js/import_history.js File ui/file_manager/file_manager/background/js/import_history.js (right): https://codereview.chromium.org/868133004/diff/1/ui/file_manager/file_manager/background/js/import_history.js#newcode751 ui/file_manager/file_manager/background/js/import_history.js:751: .then(this.writeRecord_.bind(this, record)); On 2015/01/23 23:05:58, hirono wrote: > We ...
5 years, 11 months ago (2015-01-23 23:12:04 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/868133004/20001
5 years, 11 months ago (2015-01-23 23:13:24 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel/builds/28348)
5 years, 11 months ago (2015-01-24 00:23:09 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/868133004/20001
5 years, 11 months ago (2015-01-24 00:31:51 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel/builds/28348)
5 years, 11 months ago (2015-01-24 00:32:17 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/868133004/40001
5 years, 11 months ago (2015-01-24 01:48:10 UTC) #21
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years, 11 months ago (2015-01-24 02:37:55 UTC) #22
commit-bot: I haz the power
5 years, 11 months ago (2015-01-24 02:38:51 UTC) #23
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/c51c835b762f3bd0c47b2b7ea47450f2ac1abfe6
Cr-Commit-Position: refs/heads/master@{#312999}

Powered by Google App Engine
This is Rietveld 408576698