New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 831503 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature



Sign in to add a comment

[Sync::USS] ModelTypeWorker doesn't preserve the order of remote updates in case of encryption key

Project Member Reported by mamir@chromium.org, Apr 11 2018

Issue description

When receiving encrypted remote updates, and when the encryption key isn't available "e.g. Enter Passphrase screen", the Worker keeps tracks of the incoming updates in a map keyed on server_id.

When the encryption key is available, the worker iterates over the map, decrypts the entities and passes them over to the Processor.

As a results, the order updates isn't preserved across that process.

For Hierarchical data types such as Bookmarks, the entities are expected to arrive in the same order as sent from the server.

One solution is to store the entities in a vector instead of map, but that would be a memory regression because it can grow faster than the map in case of updates having the same server id.

However, fixing crbug.com/831160 would solve the issue.
 

 

Comment 1 by pav...@chromium.org, Apr 12 2018

Actually, I don't think the order of updates from server is guaranteed, even without encryption. Imagine scenario where while client is offline another client created folder and bookmark in it. Then after some time that client changed folder's name. In this case folder's entry timestamp is much later than bookmark's. When first client comes online and requests updates it will receive bookmark first and folder after that. Sync engine in this case accumulates all the updates for datatype across all GU responses. It only passes accumulated updates to datatype after server indicates it doesn't have any more updates. On receiving all updates bookmarks can reorder them to apply to BookmarkModel in the right order.

Comment 2 by mamir@chromium.org, Apr 19 2018

OK.
Thanks a lot for the input.

Comment 3 by mamir@chromium.org, Apr 19 2018

Status: WontFix (was: Available)

Sign in to add a comment