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

Issue 2568743004: [Sync] Stop deleting LevelDB files when deleting Directory (Closed)

Created:
4 years ago by skym
Modified:
4 years ago
Reviewers:
maxbogue, pavely
CC:
chromium-reviews, sync-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Sync] Stop deleting LevelDB files when deleting Directory The LevelDB folder backing ModelTypeStore is inside Sync Data folder. While this change is being driven by race conditions from sync trying to delete this folder while it is being used, this setup is fundamental flawed. The ModelTypeStores will hold model type specific information that needs to be persistent across sign outs and disabling sync. The approach this CL takes to fix this problem is the modify the deletion logic to only affect the Directory (sqllite3) files. This means that the Sync Data folder will still exist even when sync is off. BUG=673508, 673887 Committed: https://crrev.com/4234d3c65dc2b0ad0cf19fbf5e9e1e528bc3ddaf Cr-Commit-Position: refs/heads/master@{#439835}

Patch Set 1 #

Patch Set 2 : Reverting init re-ordering, move leveldb outside Sync Data folder. #

Patch Set 3 : Rebase #

Patch Set 4 : Only delete top level files in sync data folder. #

Total comments: 4

Patch Set 5 : Updated SingleClientDirectorySyncTest to check for immediate files. #

Patch Set 6 : Updated for Max's comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+86 lines, -60 lines) Patch
M chrome/browser/sync/test/integration/single_client_directory_sync_test.cc View 1 2 3 4 6 chunks +26 lines, -7 lines 0 comments Download
M components/browser_sync/profile_sync_components_factory_impl.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M components/browser_sync/profile_sync_components_factory_impl.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M components/browser_sync/profile_sync_service.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M components/browser_sync/profile_sync_service.cc View 1 2 3 4 5 7 chunks +10 lines, -17 lines 0 comments Download
M components/sync/driver/glue/sync_backend_host_core.h View 1 2 3 3 chunks +2 lines, -7 lines 0 comments Download
M components/sync/driver/glue/sync_backend_host_core.cc View 1 2 3 6 chunks +7 lines, -14 lines 0 comments Download
M components/sync/driver/glue/sync_backend_host_impl.h View 1 2 3 4 5 1 chunk +5 lines, -6 lines 0 comments Download
M components/sync/driver/glue/sync_backend_host_impl.cc View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M components/sync/driver/sync_service_base.h View 1 2 3 1 chunk +4 lines, -2 lines 0 comments Download
M components/sync/driver/sync_service_base.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M components/sync/syncable/directory.h View 1 2 3 1 chunk +6 lines, -0 lines 0 comments Download
M components/sync/syncable/directory.cc View 1 2 3 4 5 2 chunks +19 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 44 (34 generated)
skym
PTAL
4 years ago (2016-12-13 00:01:58 UTC) #7
skym
On 2016/12/13 00:01:58, skym wrote: > PTAL Looks like I jumped the gun on posting ...
4 years ago (2016-12-13 16:11:17 UTC) #10
pavely
lgtm after name change. This change doesn't address 664920 though.
4 years ago (2016-12-13 19:40:52 UTC) #17
skym
Hopefully this attempt will pass the bots.
4 years ago (2016-12-19 21:09:46 UTC) #24
maxbogue
lgtm, though I can take another look once you fix the tests. https://codereview.chromium.org/2568743004/diff/60001/components/sync/syncable/directory.cc File components/sync/syncable/directory.cc ...
4 years ago (2016-12-20 00:54:06 UTC) #28
skym
https://codereview.chromium.org/2568743004/diff/60001/components/sync/syncable/directory.cc File components/sync/syncable/directory.cc (right): https://codereview.chromium.org/2568743004/diff/60001/components/sync/syncable/directory.cc#newcode440 components/sync/syncable/directory.cc:440: // use no folders. We also assume that there ...
4 years ago (2016-12-20 16:12:46 UTC) #31
maxbogue
Apparently I just didn't refresh and see PS#5 when I reviewed yesterday, oops. PS#6 lgtm!
4 years ago (2016-12-20 16:24:15 UTC) #34
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/2568743004/100001
4 years ago (2016-12-20 17:24:42 UTC) #39
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years ago (2016-12-20 17:30:14 UTC) #42
commit-bot: I haz the power
4 years ago (2016-12-20 17:32:15 UTC) #44
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/4234d3c65dc2b0ad0cf19fbf5e9e1e528bc3ddaf
Cr-Commit-Position: refs/heads/master@{#439835}

Powered by Google App Engine
This is Rietveld 408576698