DescriptionRemove 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. #
Messages
Total messages: 19 (7 generated)
|