What happens if there is a filename collision on the device during sync?

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: What happens if there is a filename collision on the device during sync?

Re: What happens if there is a filename collision on the device during sync?

by pbpb » Sun Jul 12, 2020 6:45 pm

Well, it seems that this has been a colossal waste of time. Sorry.
MMA sync is now so far behaving as expected, so nothing to look into any more.
Here is what I did:
* Reformatted the SD card, thus clobbering everything.
* Uninstalled MMA
* Deleted all MMA files from the device as mentioned in kb page I linked earlier.
* Reinstalled MMA with a clean install.
* Made sure I had all sync parameters set as I want on MMW, including enforcing mask, and deleting unselected.
* Ran a sync overnight.

Everything now works as expected, and files are not being put into wrong places.

I did notice, before doing all that, that there appeared to be various files that did not adhere to the mask, even though it had been set before to enforce and delete, in addition to files that for example had no tags that could be used to generate the filename (which is ok; presumably MM infers best it can from filename in that case.)

I also noticed before I started anew that renaming the collisions did not seem to be consistent, while afterwards it was perfectly consistent (in how the new name was formed).

So, I am going to surmise that somehow things were in a state where old filenames did not get updated, maybe in conjunction with some database corruption, possibly due to random accidental device 'clicks' that cancelled sync.

On that subject, I would suggest interposing a confirmation for cancel sync. My phone has a super sensitive screen, and due to the wraparound edge that for some reason samsung thinks is cool, it's almost impossible to pick up the phone without triggering something.

So, thanks for helping, but the cause of the weird behavior is going to unfortunately stay a mystery. The bright spot is I learned a lot more about how to work mma and mmw.

Re: What happens if there is a filename collision on the device during sync?

by pbpb » Sat Jul 11, 2020 6:00 pm

Interim report. I did a dry run before tackling setting up debug logging. Since I failed to remember that you said "Setup a sync with just those five files and also their duplicate filename versions", I created a playlist with only the offending tracks, but of course the duplicates were already on the device in the desired directory. The result was that it copied the 5 files, but NOT to the parent directory, but rather to the desired location. This implies that using the playlist hack is not going to be informative.

Next, ran a "normal" sync for all music from server to device, which includes the previously offending files. Now, it wants to delete the playlist and the 5 tracks. I said ok. The result: As best I can tell it did not actually delete the tracks that were in the correct place, and ALSO now it did not put those (or any other) tracks into the parent directory. This implies it will now be forever a mystery as to what the original problem was, since now I can't reproduce it.

My guess is that there was some small error in the database that got fixed by using the playlist to sync. Of course, that's a totally random guess, since I have no clue what the code looks like.

It occurs to me that I could try this again with *all* the duplicate versions in the playlist, and see if anything new happens. I did that and it said it downloaded the playlist, but nothing changed. I also then went back to syncing everything, and it said it deleted the playlist, but nothing changed.

However, I now note that at least one of the previous offending files now has a filename that is the same as the filename on the server, but which does not conform to the naming I specified in the device configuration, and I don't believe that was the case before, when one of the files was ending up in the parent dir. Since I had "enforce use of sync mask" set, and "delete unselected" also set, that as best I understand it, should not happen.

It seems that things are rather messed up, and I'm thinking that the best way to proceed is to just do a clean install of mma, and start from scratch, since currently things seem to be fubar. I am currently syncing the library from scratch after a clean install (including deleting all mma data on the device as per http://www.mediamonkey.com/support/inde ... an-install ).

That takes many hours even with very fast wifi; will let you know what happens afterwards.

Re: What happens if there is a filename collision on the device during sync?

by pbpb » Sat Jul 11, 2020 3:22 pm

Ah, ok, thanks. I forgot about that, and about the fact that you mentioned that before. Only one brain cell left to remember things any more.

Re: What happens if there is a filename collision on the device during sync?

by Lowlander » Sat Jul 11, 2020 2:48 pm

You can uncheck, but as mentioned wifi sync prompts with a dialog on what to delete. Nothing will be deleted if you don't select anything to be deleted in that dialog.

Re: What happens if there is a filename collision on the device during sync?

by pbpb » Sat Jul 11, 2020 2:42 pm

I think I have figured out at least how to create and sync a playlist which I have created in mmw. Just one question first: I assume that I need to uncheck "delete other files and playlists from device" in the autosync --> device config, or else everything but what is in that playlist (the 5 offending tracks) will get deleted from my device? (I have been keeping this checked to avoid duplicate files of the same exact track.)

Re: What happens if there is a filename collision on the device during sync?

by pbpb » Fri Jul 10, 2020 12:05 pm

Ok, thanks. I thought I looked at that and couldn't figure out how to do it. (i.e., in the device profile on mmw relative to syncing a playlist.) I'm running out of time to deal with it right now, so I'll work on it later and hopefully figure out how to do it all. Meantime, thanks for helping. Sorry that I need excruciating detail.

Re: What happens if there is a filename collision on the device during sync?

by Lowlander » Fri Jul 10, 2020 11:59 am

MMA and MMW use the same settings which are saved in MMW in the Device Profile. Thus you can make the change of sync selection in MMW (I find this easier) and MMA will use these settings on wifi sync. Just make sure you edit the correct Device Profile.

Re: What happens if there is a filename collision on the device during sync?

by pbpb » Fri Jul 10, 2020 11:52 am

Ok, thanks, still confused, though. Since I am using wifi sync, it appears I will have to select the playlist from mma? Not sure how to do that. I'm also not sure how this relates to configuration of my device in mmw in the playlist section? Unfortunately, there are a lot of moving parts to this, none of which I'm yet familiar with.

Re: What happens if there is a filename collision on the device during sync?

by pbpb » Fri Jul 10, 2020 11:00 am

Do I create the playlist on mma or mmw?

Re: What happens if there is a filename collision on the device during sync?

by Lowlander » Fri Jul 10, 2020 10:54 am

Create a Playlist with the files that you want to test the sync with. Make sure only that Playlist is selected in the sync list.

On wifi sync MMA will prompt to delete files, don't select anything to be deleted.

Re: What happens if there is a filename collision on the device during sync?

by pbpb » Fri Jul 10, 2020 9:05 am

Thanks.

Ok, I'm getting less confused. But I don't know how to make the sync selection just the offending files?

Also, I need to know how to set that so nothing would be deleted in device. In the past, I have been surprised with what it either did or did not want to delete. Sorry, but I'm naive here, so need more hand-holding.

Re: What happens if there is a filename collision on the device during sync?

by Lowlander » Thu Jul 09, 2020 9:19 pm

2) Yes, deleting the problem files, then have MMA rescan would be good. This way MMW is forced to resync them recreating the problem.
3) It would be better if the sync selection is just the offending files so log is compact, and as long as the problem reproduces this way it's more likely that MMA logs are useful (this means ignore the delete request as all files not in sync selection, but on device would be offered for deletion and you don't want that).
5) Yes, debug version of MMW is needed and yes you need to run (DBGView doesn't install) DBGView (start it before MMW) to capture the logs.

Re: What happens if there is a filename collision on the device during sync?

by pbpb » Thu Jul 09, 2020 7:36 pm

Yes, doing a wifi sync.

But, I'm not sure what you mean by "Setup a sync with just those five files"? Tell me if the following fulfills that:

1. Sync everything via wifi. That includes thousands of files on server and device, but they are currently 99.9% synced already.
2. Manually delete the offending files in the device, i.e. the ones that are in the incorrect, parent, directory. At this point the duplicate files are still on the server, but have been deleted from the device by me.
3. Do a sync.
4. Presumably, as I claim, those 5 files will reappear in that parent directory.
5. Generate a log, assuming I can figure out how from the directions. My first question on that is do I need to install the debug version of mmw? And, do I need dbgview? MS is sometimes persnickety when you try to get dev software from them (like wanting to install some giant SDK).

Or, alternately, are you telling me to create a new server directory somewhere, copy just the offending 5 files and their doppelgangers there, and set up a sync with that? That will be a problem because I can't use the same target directory on the device.

Re: What happens if there is a filename collision on the device during sync?

by Lowlander » Thu Jul 09, 2020 6:16 pm

Setup a sync with just those five files and also their duplicate filename versions and capture the sync in a debug log (step 4b): https://www.mediamonkey.com/forum/viewt ... ?f=26&t=69

If doing a wifi sync also send a log right after you see files synced to the wrong location, add logID and MMW log file to a Support Ticket.

Top