-
Notifications
You must be signed in to change notification settings - Fork 41
considering timestamp when merge records #261
Comments
…needed to be addressed in sync library brave/sync#261
This issue is not reproduced in current brave-core. There are 3 worksrounds which prevent this:
With disabled pt1 and pt2 I could reproduce the issue. Here how the data looks:
At https://github.com/brave/sync/blob/staging/client/recordUtil.js#L288
And finally it resolves to The root of the problem is the first CREATE which is the record from our device (workaround pt2) , so it absorbs then next Also I already made attempt to modify lib to keep alone operation and object id pairs Options I see: b. Simplify all by removing resolve operation at all. c. improve #313 to allow merge CREATE+DELETE or UPDATE+DELETE, but forbid merge of CREATE+UPDATE d. make merge don't ignore CREATE with existingObject!=NULL at https://github.com/brave/sync/blob/staging/client/recordUtil.js#L215 , but this way had some downside I cannot recall now. |
As per Slack discussion with @bridiver and @darkdh :
pt1 is a change in sync lib, meaning pt2 means Android and iOS for |
Closing as moving to sync v2 |
Currently sync library prefer local record over remote record when merging "resolve-sync-records"
That cause changes overridden by old record.
STR:
because on device a
""resolve-sync-records" category_name="BOOKMARKS" recordsAndExistingObjects=[[{"action":0,"bookmark":{"hideInToolbar":false,"isFolder":false,"order":"1.1.0.1","site":{"creationTime":0,"customTitle":"Welcome","favicon":"","lastAccessedTime":0,"location":"chrome://welcome/","title":"Welcome"},"parentFolderObjectId":{}},"deviceId":{"0":1},"objectData":"bookmark","objectId":{"0":95,"1":163,"2":30,"3":184,"4":95,"5":136,"6":222,"7":204,"8":194,"9":47,"10":96,"11":15,"12":11,"13":18,"14":38,"15":71},"syncTimestamp":1540869759729},{"action":1,"bookmark":{"hideInToolbar":false,"isFolder":false,"order":"1.1.0.1","site":{"creationTime":0,"customTitle":"Welcome","favicon":"","lastAccessedTime":0,"location":"chrome://welcome/","title":"Welcome"},"parentFolderObjectId":{}},"deviceId":{"0":0},"objectData":"bookmark","objectId":{"0":95,"1":163,"2":30,"3":184,"4":95,"5":136,"6":222,"7":204,"8":194,"9":47,"10":96,"11":15,"12":11,"13":18,"14":38,"15":71},"syncTimestamp":1540869759729}],[{"action":1,"bookmark":{"hideInToolbar":false,"isFolder":false,"order":"1.1.0.1","site":{"creationTime":0,"customTitle":"WelcomeHOME","favicon":"","lastAccessedTime":0,"location":"chrome://welcome/","title":"WelcomeHOME"},"parentFolderObjectId":{}},"deviceId":{"0":1},"objectData":"bookmark","objectId":{"0":95,"1":163,"2":30,"3":184,"4":95,"5":136,"6":222,"7":204,"8":194,"9":47,"10":96,"11":15,"12":11,"13":18,"14":38,"15":71},"syncTimestamp":1540869775901},{"action":1,"bookmark":{"hideInToolbar":false,"isFolder":false,"order":"1.1.0.1","site":{"creationTime":0,"customTitle":"Welcome","favicon":"","lastAccessedTime":0,"location":"chrome://welcome/","title":"Welcome"},"parentFolderObjectId":{}},"deviceId":{"0":0},"objectData":"bookmark","objectId":{"0":95,"1":163,"2":30,"3":184,"4":95,"5":136,"6":222,"7":204,"8":194,"9":47,"10":96,"11":15,"12":11,"13":18,"14":38,"15":71},"syncTimestamp":1540869759729}]]"
and it got
resolved-sync-records" categoryName="BOOKMARKS" records=[]"
It will be be changed once you add a new bookmark on device b and wait for it to propagate
The text was updated successfully, but these errors were encountered: