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

Issue 1082893003: [Sync] Erase sync DB when corrupted (Closed)

Created:
5 years, 8 months ago by maniscalco
Modified:
5 years, 7 months ago
CC:
chromium-reviews, tim+watch_chromium.org, zea+watch_chromium.org, maxbogue+watch_chromium.org, pvalenzuela+watch_chromium.org, plaree+watch_chromium.org, maniscalco+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Sync] Erase sync DB when corrupted Directory now registers to be notified of catastrophic sync DB errors. Upon notification, Directory triggers an unrecoverable sync error which causes ProfileSyncService to delete the sync DB. Add integration test that verifies the sync DB is deleted when DB corruption is detected. Remove unused member variable allow_failure_for_test_ from DirectoryBackingStore. Add MockUnrecoverableErrorHandler to assist in writing tests for Directory. BUG=470993 Committed: https://crrev.com/90a7f8d3e3b3a2aac43e71a93eac2731f084945c Cr-Commit-Position: refs/heads/master@{#327120} Committed: https://crrev.com/8382e4e5dce071e21f1297df234a17bdf7a5ed32 Cr-Commit-Position: refs/heads/master@{#327766}

Patch Set 1 #

Patch Set 2 : Remove an unnecessary include. #

Total comments: 8

Patch Set 3 : Improve comments based on CR feedback #

Patch Set 4 : Apply CR feedback #

Patch Set 5 : Reduce test runtime by writing fewer bookmarks #

Unified diffs Side-by-side diffs Delta from patch set Stats (+261 lines, -31 lines) Patch
M chrome/browser/sync/test/integration/single_client_directory_sync_test.cc View 1 2 3 4 3 chunks +75 lines, -0 lines 0 comments Download
M sync/BUILD.gn View 1 2 2 chunks +4 lines, -0 lines 0 comments Download
M sync/sync_tests.gypi View 2 chunks +4 lines, -0 lines 0 comments Download
M sync/syncable/directory.h View 3 chunks +7 lines, -0 lines 0 comments Download
M sync/syncable/directory.cc View 3 chunks +15 lines, -3 lines 0 comments Download
M sync/syncable/directory_backing_store_unittest.cc View 4 chunks +8 lines, -23 lines 0 comments Download
M sync/syncable/directory_unittest.cc View 1 2 3 2 chunks +20 lines, -0 lines 0 comments Download
M sync/syncable/on_disk_directory_backing_store.h View 1 chunk +2 lines, -2 lines 0 comments Download
M sync/syncable/on_disk_directory_backing_store.cc View 1 chunk +2 lines, -3 lines 0 comments Download
A sync/test/directory_backing_store_corruption_testing.h View 1 chunk +27 lines, -0 lines 0 comments Download
A sync/test/directory_backing_store_corruption_testing.cc View 1 2 3 4 1 chunk +36 lines, -0 lines 0 comments Download
A sync/util/mock_unrecoverable_error_handler.h View 1 2 3 1 chunk +35 lines, -0 lines 0 comments Download
A sync/util/mock_unrecoverable_error_handler.cc View 1 chunk +26 lines, -0 lines 0 comments Download

Messages

Total messages: 25 (7 generated)
maniscalco
Nicolas, would you please review this change? Previously we talked about writing a sentinel file ...
5 years, 8 months ago (2015-04-24 22:39:32 UTC) #2
pval...(no longer on Chromium)
test LGTM (one small non-blocking comment) Thanks for taking the time to create an awesome ...
5 years, 7 months ago (2015-04-27 19:09:34 UTC) #3
maniscalco
https://codereview.chromium.org/1082893003/diff/20001/chrome/browser/sync/test/integration/single_client_directory_sync_test.cc File chrome/browser/sync/test/integration/single_client_directory_sync_test.cc (right): https://codereview.chromium.org/1082893003/diff/20001/chrome/browser/sync/test/integration/single_client_directory_sync_test.cc#newcode116 chrome/browser/sync/test/integration/single_client_directory_sync_test.cc:116: // Write a bunch more bookmarks to ensure the ...
5 years, 7 months ago (2015-04-27 19:16:41 UTC) #4
Nicolas Zea
LGTM https://codereview.chromium.org/1082893003/diff/20001/sync/syncable/directory_unittest.cc File sync/syncable/directory_unittest.cc (right): https://codereview.chromium.org/1082893003/diff/20001/sync/syncable/directory_unittest.cc#newcode2045 sync/syncable/directory_unittest.cc:2045: dir.OnCatastrophicError(); out of curiosity, why twice? https://codereview.chromium.org/1082893003/diff/20001/sync/test/directory_backing_store_corruption_testing.h File ...
5 years, 7 months ago (2015-04-27 19:17:33 UTC) #5
maniscalco
Thanks for the speedy reviews! https://codereview.chromium.org/1082893003/diff/20001/sync/syncable/directory_unittest.cc File sync/syncable/directory_unittest.cc (right): https://codereview.chromium.org/1082893003/diff/20001/sync/syncable/directory_unittest.cc#newcode2045 sync/syncable/directory_unittest.cc:2045: dir.OnCatastrophicError(); On 2015/04/27 19:17:32, ...
5 years, 7 months ago (2015-04-27 19:51:17 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1082893003/60001
5 years, 7 months ago (2015-04-27 20:45:01 UTC) #9
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 7 months ago (2015-04-27 21:15:27 UTC) #10
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/90a7f8d3e3b3a2aac43e71a93eac2731f084945c Cr-Commit-Position: refs/heads/master@{#327120}
5 years, 7 months ago (2015-04-27 21:16:34 UTC) #11
vkuzkokov
A revert of this CL (patchset #4 id:60001) has been created in https://codereview.chromium.org/1104423005/ by vkuzkokov@chromium.org. ...
5 years, 7 months ago (2015-04-28 11:26:37 UTC) #12
maniscalco
Nicolas, Patrick, PTAL at the diff between patch sets #4 and #5 (#4 is what ...
5 years, 7 months ago (2015-04-28 23:39:21 UTC) #13
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1082893003/80001
5 years, 7 months ago (2015-04-29 15:18:36 UTC) #16
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 7 months ago (2015-04-29 16:05:36 UTC) #18
pval...(no longer on Chromium)
lgtm Great work reducing the time. This is a lot faster than patchset 4. By ...
5 years, 7 months ago (2015-04-29 17:09:21 UTC) #19
maniscalco
On 2015/04/29 17:09:21, pvalenzuela wrote: > lgtm > > Great work reducing the time. This ...
5 years, 7 months ago (2015-04-29 19:48:53 UTC) #20
Nicolas Zea
lgtm
5 years, 7 months ago (2015-04-30 17:39:22 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1082893003/80001
5 years, 7 months ago (2015-04-30 17:43:31 UTC) #23
commit-bot: I haz the power
Committed patchset #5 (id:80001)
5 years, 7 months ago (2015-04-30 19:39:05 UTC) #24
commit-bot: I haz the power
5 years, 7 months ago (2015-04-30 19:41:23 UTC) #25
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/8382e4e5dce071e21f1297df234a17bdf7a5ed32
Cr-Commit-Position: refs/heads/master@{#327766}

Powered by Google App Engine
This is Rietveld 408576698