Incomplete library when a sync is halted

Issue description:

(Copy and paste from Cancel/Pause sync or Only delete entries upon user command)
I noticed that if the app was killed during a sync, or there was a network problem (for example, when I go out and there is a short break when switching from wifi to mobile network), the sync will be incomplete.
I have ~8000 songs in my library, and if the sync is halted at, say, around 1000 songs, I’ll lose the data for the rest 7000.

I did not know this was not supposed to happen. I am posting this and providing the log of repro as suggested in the previous post.


Upload description: sandimy_sync

Additional information:

The sync in the log is performed with Google Drive, which is not available in the drop list of the post. I chose Onedrive instead since I have observed the same problem with Onedrive.
Edit: add Google Drive after posting

Reproduction steps:

When the library is ready, do a new sync from the filter.
During the sync, turn off the network or kill the app.
The data of the unsynced songs will be lost.

Media provider:

One Drive, Google Drive



So seems some network disconnection does not trigger sync fail, will fix.

But there’s no way an app kill to generate missing data as the transaction can’t be validated.

1 Like

I tried a few times, and yes, you’re right; killing the app did not overwrite the library.
Unfortunately, I knew the incomplete library was not the expected behavior a couple of days after my last data loss, and the problematic sync was no longer in the log. I was not able to repro. Maybe there were some network errors.
Let’s just hope it will never happen again. (I’ll remember to get the log if it happens)

Out of curiosity: Why does the sync fail at all when the network connection is lost instead of being paused and then resumed when a connection is reestablished? That would take a lot of the annoyance out of my 50+min syncs.

Because data integrity and transactions.

Pausing and continuing 2 days later does not work, ids may have change, data have changed, …

IIRC you were supposed to send me logs about sync issue still waiting :slight_smile: