On 10/09/2015 8:25 pm, Ryan Kelly wrote:
On 10/09/2015 20:13, Axel Kittenberger wrote:
Dear List!

I just finished setting up an own sync server and started set up the
sync for one of my coworkers. Unfortunally after a day it deleted all
his bookmarks that were stored within folders.

Ouch :-(

I hope we can get to the bottom of this.

My config and logs are on pastebin, due to 100k limit of the
list: http://pastebin.com/BRtzrxUd
Its an apache2 / mysql / syncserver config.

There's definitely a "delete all stored bookmarks" command in there
issued by one of the clients:

"""
[Thu Sep 10 11:00:39.983268 2015] [wsgi:error] [pid 24107:tid
140606185019136] INFO:mozsvc.metrics:{"code": 200, "request_time":
0.07348108291625977, "remoteAddressChain": ["131.130.188.201"], "agent":
"Iceweasel/38.2.1 FxSync/1.40.0.20150828090403.desktop",
"syncstorage.storage.sql.pool.get": 0.00016689300537109375,
"syncstorage.storage.sql.db.execute": 0.01190805435180664, "path":
"https://sync.csc.univie.ac.at/storage/1.5/2/storage/bookmarks";,
"method": "DELETE"}
"""

But I don't know enough about the client behavior to suggest what might
have triggered this.  Mark, thoughts?

It looks like Sync will issue this command after a restore of bookmarks completes, presumably with the intention of re-uploading those newly restored bookmarks - the next entries in the log appear to be doing something like that:

[Thu Sep 10 10:51:54.728307 2015] [wsgi:error] [pid 24107:tid 140605983594240] INFO:mozsvc.metrics:{"code": 200, "request_time": 0.12106800079345703, 
"remoteAddressChain": ["131.130.188.201"], "agent": "Iceweasel/38.2.1 FxSync/1.40.0.20150828090403.desktop", "syncstorage.storage.sql.pool.get": 
5.316734313964844e-05, "syncstorage.storage.sql.db.execute": 0.038949012756347656, "path": "https://sync.csc.univie.ac.at/storage/1.5/2/storage/bookmarks";, 
"method": "POST"}

(repeated 3 times)

I know that Firefox keeps many bookmark backups and will restore them in some cases (eg, on a corrupt places.db) - so it seems possible that something unrelated to Sync went wrong initially and Firefox made an attempt to recover bookmarks, which caused Sync to delete the server copy of all bookmarks and re-upload the restored set. If that restored set was incomplete, the other devices then also got that incomplete set and everyone was sad - it seems possible the server copy of the bookmarks could be better than the restored set making the Sync behaviour simply wrong here, but it's difficult to speculate about what is actually happening.

Apart from figuring out, what this delete command might have triggered, how can 
I properly restore the bookmarks to work with sync again? When I just reload 
them from the backup, the next sync seems to delete it again.

How are you restoring those bookmarks? When you say Sync deletes them, are you seeing them deleted from the device they were restored onto immediately after a Sync, or are you seeing the problem on other devices?

It would be great to see logs from the client - if you set the preference services.sync.log.appender.file.logOnSuccess to true, you should get logs from every Sync (sync probably thinks it is working just fine, so isn't creating logs in this case)

I apologize for offering more questions than answers, but we'd love to get to the bottom of this.

Mark
_______________________________________________
Sync-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/sync-dev

Reply via email to