Closed Bug 1434800 Opened 3 years ago Closed 3 years ago

Don't treat children moved out of a deleted synced folder as orphans

Categories

(Firefox :: Sync, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
Firefox 60
Tracking Status
firefox60 --- fixed

People

(Reporter: lina, Assigned: lina)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Rebecca and I uncovered this today. If you manually move all children out of a folder, then delete the old folder on one side, we'll merge the children twice: once when we walk the new folder, and again when we walk the unchanged, old folder on the other side to check for orphans.

This causes us to treat the already-merged children as orphans, insert two conflicting nodes for each child into the merged tree, and throw a constraint violation when we try to insert that structure into SQLite.

The fix is to bail and ignore already-merged children when checking for local deletions of a remote node, or remote deletions of a local node.
Comment on attachment 8947338 [details]
Bug 1434800 - Don't treat children moved out of a deleted synced folder as orphans.

https://reviewboard.mozilla.org/r/217072/#review222904

Nice!
Attachment #8947338 - Flags: review?(markh) → review+
Also fixed some misleading comments. :-)
Pushed by kcambridge@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4df5033326d3
Don't treat children moved out of a deleted synced folder as orphans. r=markh
https://hg.mozilla.org/mozilla-central/rev/4df5033326d3
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 60
Depends on: 1435145
You need to log in before you can comment on or make changes to this bug.