Commit c93fad09 authored by Mikel Astiz's avatar Mikel Astiz Committed by Commit Bot

Disable the USS migrator for synced bookmarks

The vast majority of bookmarks have already gone through the USS
migrator according to metric Sync.USSMigrationEntityCount.BOOKMARK and
it's no longer worth maintaining the historically-problematic USS
migrator.

Specifically, the proto fields originator_cache_guid and
originator_client_item_id and NOT populated by the USS migrator, and
this causes issues when it comes to inferring GUIDs for bookmarks, as
the code started doing recently in particular with
https://chromium-review.googlesource.com/c/chromium/src/+/1948430.

Change-Id: I537faa4c19300e12e23ff0a97b1ad52d165d5e3a
Bug: 1048381,978430
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2041290
Commit-Queue: Mikel Astiz <mastiz@chromium.org>
Reviewed-by: default avatarMarc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#738929}
parent 259670f9
...@@ -129,7 +129,16 @@ void ModelTypeRegistry::ConnectNonBlockingType( ...@@ -129,7 +129,16 @@ void ModelTypeRegistry::ConnectNonBlockingType(
worker_ptr->AsWeakPtr(), base::SequencedTaskRunnerHandle::Get())); worker_ptr->AsWeakPtr(), base::SequencedTaskRunnerHandle::Get()));
// Attempt migration if necessary. // Attempt migration if necessary.
if (do_migration) { if (do_migration && type == BOOKMARKS) {
// Almost all bookmarks are known to have migrated so let's avoid the USS
// migrator for bookmarks, since it's known to be problematic and hard to
// maintain (diverges from the data fetched from the actual server).
//
// Instead, the local copy in the directory should be purged, and the
// initial data fetched from the server.
directory()->PurgeEntriesWithTypeIn(ModelTypeSet(BOOKMARKS), ModelTypeSet(),
ModelTypeSet());
} else if (do_migration) {
// TODO(crbug.com/658002): Store a pref before attempting migration // TODO(crbug.com/658002): Store a pref before attempting migration
// indicating that it was attempted so we can avoid failure loops. // indicating that it was attempted so we can avoid failure loops.
int migrated_entity_count = 0; int migrated_entity_count = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment