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

Issue 867793003: Remove dependency on server generated type root folders (Closed)

Created:
5 years, 11 months ago by stanisc
Modified:
5 years, 10 months ago
Reviewers:
Nicolas Zea, maniscalco
CC:
chromium-reviews, tim+watch_chromium.org, pvalenzuela+watch_chromium.org, maxbogue+watch_chromium.org, zea+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

Remove dependency on server generated type root folders This change prepares the client to deal with implicit permanent folders in Sync server updates. That includes the following: - Expect type root folders to not come from the server on the initial sync. The client auto-creates type root folders for all types except Bookmarks and Nigori when progress marker changes from empty to non-empty. These folders are created as local nodes (with client IDs) that aren't expected to sync back to the server. - Expect empty parent IDs in updates for both new and existing items. - Because the client code updates first, the client must expect server to override locally created type root folders. To enable that the directory update code that matches update entities to local entities was updated to look at server unique tags in addition to client unique tags. Later when the server stops generating folders we should be able to remove that code. - Added some extra special cases in Directory::CheckTreeInvariants to deal with client side created type root folders. - Added / modified a few tests to cover cases with implicit parent IDs in updates. BUG=438313 Committed: https://crrev.com/8d4046a92a3314bf5e1b6f1dd6a3c4aed5449e64 Cr-Commit-Position: refs/heads/master@{#313977}

Patch Set 1 : #

Total comments: 5

Patch Set 2 : Added ScopedKernelLock to Directory::HasEmptyDownloadProgress #

Total comments: 25

Patch Set 3 : Addressed CR feedback #

Patch Set 4 : Bumped protocol version #

Patch Set 5 : Added extra comment about existing type root folder. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+354 lines, -128 lines) Patch
M sync/engine/directory_update_handler.h View 1 chunk +3 lines, -0 lines 0 comments Download
M sync/engine/directory_update_handler.cc View 1 2 3 4 3 chunks +30 lines, -0 lines 0 comments Download
M sync/engine/directory_update_handler_unittest.cc View 9 chunks +17 lines, -38 lines 0 comments Download
M sync/engine/syncer_unittest.cc View 1 2 8 chunks +107 lines, -46 lines 0 comments Download
M sync/engine/syncer_util.cc View 1 2 3 chunks +39 lines, -15 lines 0 comments Download
M sync/internal_api/public/base/model_type.h View 1 chunk +4 lines, -0 lines 0 comments Download
M sync/protocol/sync.proto View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M sync/syncable/directory.h View 1 2 1 chunk +4 lines, -1 line 0 comments Download
M sync/syncable/directory.cc View 1 2 7 chunks +31 lines, -12 lines 0 comments Download
M sync/syncable/directory_unittest.cc View 1 2 1 chunk +50 lines, -0 lines 0 comments Download
M sync/syncable/entry_kernel.h View 1 chunk +0 lines, -1 line 0 comments Download
M sync/syncable/entry_kernel.cc View 1 chunk +1 line, -1 line 0 comments Download
M sync/syncable/model_neutral_mutable_entry.h View 2 chunks +5 lines, -0 lines 0 comments Download
M sync/syncable/model_neutral_mutable_entry.cc View 1 2 1 chunk +36 lines, -0 lines 0 comments Download
M sync/syncable/model_type.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M sync/syncable/syncable_id.cc View 1 chunk +12 lines, -8 lines 0 comments Download
M sync/syncable/syncable_util.cc View 1 2 2 chunks +10 lines, -5 lines 0 comments Download

Messages

Total messages: 19 (7 generated)
stanisc
Nicolas, PTAL. This is the third patch for this work item, after which we should ...
5 years, 11 months ago (2015-01-23 22:06:18 UTC) #6
maniscalco
(drive-by question...) https://codereview.chromium.org/867793003/diff/80001/sync/syncable/directory.cc File sync/syncable/directory.cc (right): https://codereview.chromium.org/867793003/diff/80001/sync/syncable/directory.cc#newcode929 sync/syncable/directory.cc:929: return kernel_->persisted_info.HasEmptyDownloadProgress(type); Normally, when Directory methods access ...
5 years, 11 months ago (2015-01-24 00:56:00 UTC) #8
stanisc
Addressed issue found by Nick - added ScopedKernelLock to Directory::HasEmptyDownloadProgress. https://codereview.chromium.org/867793003/diff/80001/sync/syncable/directory.cc File sync/syncable/directory.cc (right): https://codereview.chromium.org/867793003/diff/80001/sync/syncable/directory.cc#newcode929 ...
5 years, 11 months ago (2015-01-26 19:02:09 UTC) #9
maniscalco
https://codereview.chromium.org/867793003/diff/80001/sync/syncable/directory.cc File sync/syncable/directory.cc (right): https://codereview.chromium.org/867793003/diff/80001/sync/syncable/directory.cc#newcode929 sync/syncable/directory.cc:929: return kernel_->persisted_info.HasEmptyDownloadProgress(type); On 2015/01/26 19:02:09, stanisc wrote: > On ...
5 years, 11 months ago (2015-01-26 19:17:34 UTC) #10
Nicolas Zea
https://codereview.chromium.org/867793003/diff/100001/sync/engine/directory_update_handler.cc File sync/engine/directory_update_handler.cc (right): https://codereview.chromium.org/867793003/diff/100001/sync/engine/directory_update_handler.cc#newcode74 sync/engine/directory_update_handler.cc:74: IsValidProgressMarker(progress_marker)) { Should IsValidProgressMarker be performing the check for ...
5 years, 11 months ago (2015-01-26 23:21:53 UTC) #11
stanisc
Answered some questions. I'll address the remaining comments tomorrow. https://codereview.chromium.org/867793003/diff/100001/sync/engine/directory_update_handler.cc File sync/engine/directory_update_handler.cc (right): https://codereview.chromium.org/867793003/diff/100001/sync/engine/directory_update_handler.cc#newcode74 sync/engine/directory_update_handler.cc:74: ...
5 years, 11 months ago (2015-01-28 07:30:06 UTC) #12
stanisc
Addressed CR feedback and bumped client-to-server protocol version to allow the server to distinguish an ...
5 years, 10 months ago (2015-01-29 00:27:38 UTC) #13
maniscalco
https://codereview.chromium.org/867793003/diff/80001/sync/syncable/directory.cc File sync/syncable/directory.cc (right): https://codereview.chromium.org/867793003/diff/80001/sync/syncable/directory.cc#newcode929 sync/syncable/directory.cc:929: return kernel_->persisted_info.HasEmptyDownloadProgress(type); On 2015/01/29 00:27:37, stanisc wrote: > On ...
5 years, 10 months ago (2015-01-29 00:36:34 UTC) #14
Nicolas Zea
LGTM with the nit mentioned (not sure if you still wanted to add a comment ...
5 years, 10 months ago (2015-01-30 00:07:21 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/867793003/160001
5 years, 10 months ago (2015-01-30 20:16:01 UTC) #17
commit-bot: I haz the power
Committed patchset #5 (id:160001)
5 years, 10 months ago (2015-01-30 20:21:09 UTC) #18
commit-bot: I haz the power
5 years, 10 months ago (2015-01-30 20:22:05 UTC) #19
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/8d4046a92a3314bf5e1b6f1dd6a3c4aed5449e64
Cr-Commit-Position: refs/heads/master@{#313977}

Powered by Google App Engine
This is Rietveld 408576698