I think there might be a bug in Sync where we forget to clean up `moz_origins`. When we [delete bookmarks](https://searchfox.org/mozilla-central/rev/85ae3b911d5fcabd38ef315725df32e25edef83b/toolkit/components/places/bookmark_sync/src/store.rs#983-999,1018-1031), we set the frecency of their URLs to -1 (to avoid calling `CALCULATE_FRECENCY` for every item in a long-running transaction), and then recalculate [all of them after](https://searchfox.org/mozilla-central/rev/85ae3b911d5fcabd38ef315725df32e25edef83b/toolkit/components/places/SyncedBookmarksMirror.jsm#2494-2508). But we never call `DELETE FROM moz_updateoriginsupdate_temp` after recalculating. (Our [recalculate-on-idle](https://searchfox.org/mozilla-central/rev/85ae3b911d5fcabd38ef315725df32e25edef83b/toolkit/components/places/nsNavHistory.cpp#220) logic does this correctly). Could that cause this bug?
Bug 1650511 Comment 10 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
I think there might be a bug in Sync where we forget to clean up `moz_origins`. When we [delete bookmarks](https://searchfox.org/mozilla-central/rev/85ae3b911d5fcabd38ef315725df32e25edef83b/toolkit/components/places/bookmark_sync/src/store.rs#983-999,1018-1031), we set the frecency of their URLs to -1 (to avoid calling `CALCULATE_FRECENCY` for every item in a long-running transaction), and then recalculate [all of them after](https://searchfox.org/mozilla-central/rev/85ae3b911d5fcabd38ef315725df32e25edef83b/toolkit/components/places/SyncedBookmarksMirror.jsm#2494-2508). But we never call `DELETE FROM moz_updateoriginsupdate_temp` after recalculating. (Our [recalculate-on-idle](https://searchfox.org/mozilla-central/rev/85ae3b911d5fcabd38ef315725df32e25edef83b/toolkit/components/places/nsNavHistory.cpp#241-252,274-280) logic does this correctly). Could that cause this bug?