Status: Assigned
Owner: [email protected]
CC: [email protected]
Labels: Type-Bug Pri-2 OS-All Area-Sync Mstone-4

New issue 25542 by [email protected]: model associator can accidentally  
believe LoadAssociations was successful, but it wasn't
http://code.google.com/p/chromium/issues/detail?id=25542

I got into a situation where my Bookmarks json file contained nodes that
were not persisted (they did not exist) in SyncData.sqlite3.  I'm not sure
how I got into this state, it was likely due to a crash during debugging or
myself terminating terminating the debug session before the right bits were
saved in the right place; but apparently this situation exists.

The problem occurs the next time Chrome starts up.  The BookmarkModel
determines that the Bookmarks file did not change (it didn't), so the
ModelAssociator chooses to trust SyncData.sqlite3 and just load
associations from it.  Everything goes merrily along until a BookmarkModel
operation referencing one of the nodes that did not exist in
SyncData.sqlite3; we SetUnrecoverableError in the PSS and (likely) crash
shortly thereafter.

I talked with Munjal and to be fully accurate, the associator could run
verification after loading associations and Build if it fails, but this
eats away at the benefit (perf) of persisting ids in the first place.  If
we just compare the sizes of the two models, however, (after
LoadAssociations) we can determine in constant time (perhaps by using
BookmarkModel::nodes_ordered_by_url_set_.size()) if we are truly "in sync",
because if the sizes are equal and we have not already failed by the end of
LoadAssociations, this must be true.  (Maybe individual fields would
differ, but at least we would have valid node-node association).

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/group/chromium-bugs
-~----------~----~----~----~------~----~------~--~---

Reply via email to