Closed Bug 1436837 Opened 8 years ago Closed 8 years ago

Always prefer the local value state for synced roots

Categories

(Firefox :: Sync, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 60
Tracking Status
firefox60 --- fixed

People

(Reporter: lina, Assigned: lina)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Currently, the mirror treat roots like any other folder, and applies changes like titles, descriptions, and creation dates. Per our conversation on IRC this morning, these kinds of changes don't make sense for roots, and we should treat them as immutable.
Comment on attachment 8949534 [details] Bug 1436837 - Always prefer the local value state for synced roots. https://reviewboard.mozilla.org/r/218882/#review224620 ::: toolkit/components/places/SyncedBookmarksMirror.jsm:1906 (Diff revision 1) > // A view of the value states for all bookmarks in the mirror. We use triggers > // on this view to update Places. Note that we can't just `REPLACE INTO > // moz_bookmarks`, because `REPLACE` doesn't fire the `AFTER DELETE` triggers > // that Places uses to maintain schema coherency. > await db.execute(` > - CREATE TEMP VIEW newRemoteItems(localId, remoteId, localGuid, mergedGuid, > + CREATE TEMP VIEW mergedItems(localId, remoteId, hasRemoteValue, oldGuid, While I was here, I renamed the views and column names to better reflect what they do. "New" has a specific meaning in this file, which we're not using here. ::: toolkit/components/places/tests/sync/test_bookmark_deduping.js:413 (Diff revision 1) > let changesToUpload = await buf.apply(); > deepEqual(await buf.fetchUnmergedGuids(), [], "Should merge all items"); > > let idsToUpload = inspectChangeRecords(changesToUpload); > deepEqual(idsToUpload, { > - updated: [], > + updated: ["mobile"], This is the semantic change I mentioned in the commit message. Since we added `bookmarkAAA1`, we bumped mobile's change counter. Even though we deduped `bookmarkAAA1` to `bookmarkAAAA`, where Places now matches the server, we still keep mobile flagged for reupload. I think that's fine, and consistent with what we do today.
Comment on attachment 8949534 [details] Bug 1436837 - Always prefer the local value state for synced roots. https://reviewboard.mozilla.org/r/218882/#review224770
Attachment #8949534 - Flags: review?(mak77) → review+
Pushed by kcambridge@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e7c0d34808c7 Always prefer the local value state for synced roots. r=mak
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 60
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: