dsnopek/anki-sync-server

uploadChanges seems broken

Akendo opened this issue · 2 comments

Hi

I did run in on of my decks following check_media feature to clean up all of my unnecessary elements.

Afterwards I did sync to the anki-sync-server.
But the sync nerver finsihed, the client is keeping uploading to the server without any progress.

In the logs files I can see that he's executing all the time the uploadChanges .

at first I can see how some payload is uploaded, but then I can't see any change.
It seems to me like a loop that is not finished or something.

2016-01-23 11:52:51,309:root:INFO:CollectionThread[/home/akendo/src/anki-sync-server/collections/akendo/collection.anki2]: Running uploadChanges(*[], **{})
2016-01-23 11:52:51,321:root:INFO:CollectionThread[/home/akendo/src/anki-sync-server/collections/akendo/collection.anki2]: Running uploadChanges(*[], **{})
2016-01-23 11:52:51,332:paste.httpserver.ThreadPool:INFO:kill_hung_threads status: 10 threads (0 working, 10 idle, 0 starting) ave time N/A, max time 0.00sec, 
killed 0 workers
2016-01-23 11:52:51,333:root:INFO:CollectionThread[/home/akendo/src/anki-sync-server/collections/akendo/collection.anki2]: Running uploadChanges(*[], **{})

Any idea?

cdpm commented

SyncMediaHandler.uploadChanges() currently doesn't delete files deleted on the client. If you delete files on the client and then sync, the sync number (usn) returned to the client is not incremented, causing the client to send the same media changes over and over again. I attempted a fix in #34.

Was fixed by #34