brave / sync

deprecated Brave sync server. (sync now uses a fork of the Chromium sync protocol.)
Mozilla Public License 2.0
204 stars 41 forks source link

Merge keeps alone CREATE and DELETE #315

Closed AlexeyBarabash closed 5 years ago

AlexeyBarabash commented 5 years ago

We met the situation when [CREATE, UPDATE] were merged to [CREATE], which was then ignored because local object had been existed. This PR makes CREATE and DELETE records stays alone to prevent such ignoring. So only UPDATE records of the same object id are merged.

STR for brave-core brave-syncer branch: 1) DeviceA: create folderA in bookmarks 2) DeviceA: create bookmarks of brave://bookmarks, brave://sync, brave://inspect, all in Bookmarks Bar folder 3) DeviceA: enable sync and copy code words 4) DeviceB: join sync chain with words from pt.3 5) DeviceB: As soon as bookmarks from DeviceA appear , move 3 bookmarks into folderA 6) Actual on DeviceA: bookmark will not be moved Expected on DeviceA: bookmarks should be moved.