Issue Details (XML | Word | Printable)

Key: MBS-2529
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Oliver Charles
Reporter: zos18
Votes: 4
Watchers: 6
Operations

If you were logged in you would be able to see more operations.
MusicBrainz Server

Orphaned release group and recordings after rejecting or cancelling a release/medium

Created: 04/Jun/11 01:22 PM   Updated: 20/Jul/12 03:43 PM   Resolved: 19/Oct/11 10:50 AM
Component/s: Edit system
Affects Version/s: None
Fix Version/s: Bug fixes, 2011-09-19, Bug fixes, 2011-11-14

Issue Links:
Duplicate
 
Relates
 
Resolution
 



Sort Order: Ascending order - Click to sort in descending order
voiceinsideyou added a comment - 04/Jun/11 02:09 PM

These were only closed a couple of hours ago, right? Worth waiting to see whether modbot will clean them up before logging such issues?


zos18 added a comment - 04/Jun/11 02:32 PM

voiceinsideyou added a comment - 04/Jun/11 02:44 PM - edited

Fair enough. I guess I'd expect the RG to be cleaned up if there are no other pending edits against it; but the recordings might be an issue - since NATs are now just solo recordings - how would modbot know which were NATs and which were left over from a cancelled edit? :/ This could be creating a vast amount of dodgy data in the DB if this is indeed the case though!


zos18 added a comment - 04/Jun/11 03:01 PM

> This could be creating a vast amount of dodgy data in the DB if this is indeed the case though!

Indeed, especially if the reason for the cancel/reject are a number of misspelled tracks and the release is added again with the correct titles (instead of changing the misspelled)


Aurélien Mino added a comment - 07/Jun/11 08:34 AM

Marking as major for the recordings part.


Aurélien Mino added a comment - 07/Jun/11 10:07 AM

Duke Yin added a comment - 13/Jun/11 10:47 PM

An easy way to tell standalone recordings apart from ones created by a release:

A standalone recording will have an "add standalone recording" edit with a mandatory note (eg, http://musicbrainz.org/recording/1ba9fe0e-aab7-4151-bcf9-ce5b7fca7fd1/edits).

A recording created through the release editor will not have any history at all (eg, http://musicbrainz.org/recording/70fab960-184a-46de-9d0e-4559b573c3a0/edits).

So, ModBot should be set to purge recordings if...
1) There is no "add standalone recording" edit in the recording's history...
2) It is not attached to any releases/tracklists.

It'd be great if this could be added soon because I just realized how much of a mess this is causing. (I want to vote down someone's addrelease right now, actually, since spelling errors and no track lengths, and some pre-existing recordings should have been used. There are 32 recordings involved and 32 orphans will be painful.)


Oliver Charles added a comment - 14/Jun/11 01:24 PM

This is partly in review at http://codereview.musicbrainz.org/r/1340/.

  • To clean up current orphans, I need the 2 databases merged (so I can find recordings that match the 2 conditions Duke mentioned). I've made a separate ticket for this
  • Release groups are harder to cleanup. They come as a result off the add release group edit, which is an autoedit. I'm considering adding code so that when a release is deleted, if its release group is now empty, the release group is deleted too. Would this work?

Aurélien Mino added a comment - 20/Jul/11 06:13 AM

Not really fixed, at least for release-group: http://musicbrainz.org/release-group/a625cffd-d61e-442c-9a9a-65af6bea7aa7 still exists whereas http://musicbrainz.org/edit/14781116 has been rejected.


Oliver Charles added a comment - 20/Jul/11 12:18 PM

Murdos, did you see my comment above? Would like feedback on that proposal.


Aurélien Mino added a comment - 20/Jul/11 12:23 PM - edited

OCharles, why are you closing tickets when they're not resolved?


Oliver Charles added a comment - 20/Jul/11 12:44 PM

I imagine my "shipit" script closed this when the review passed.


Oliver Charles added a comment - 02/Aug/11 09:46 AM

Decision required: Is it OK to delete a release group if deleting the last release in would leave it empty?


Aurélien Mino added a comment - 02/Aug/11 11:56 AM

It's ok for me to "delete a release group if deleting the last release in would leave it empty"


voiceinsideyou added a comment - 02/Aug/11 12:27 PM

Sure, assuming no pending edits to the RG, I guess?

However scripts should probably still clean empty RGs up periodically - otherwise a pending edit on the RG might prevent automatic removal at time of release deletion/cancel; and then there'd be nothing to clean up later?


Johannes Weißl added a comment - 09/Aug/11 07:29 PM

What exactly is meant by "Is it OK to delete a release group if deleting the last release in would leave it empty"?
Does it mean you can delete a release group that has one release in it? I would oppose to that. Or does it mean that if the last release gets deleted from a release group, the release group automatically gets removed? That would be ok.

However, I think this wouldn't be needed if we just (like for artists) remove empty RGs (with no pending edits) periodically...


voiceinsideyou added a comment - 10/Aug/11 12:53 PM

Of course it means the latter.


Oliver Charles added a comment - 12/Aug/11 12:02 PM

Reached enough of a decision to continue work


Ross Collins added a comment - 22/Sep/11 02:20 PM

Should existing orphaned recordings be automatically deleted now, or do we have to do this manually? e.g. this recording has been orphaned for weeks now: http://musicbrainz.org/recording/b3defaa0-7c2a-4ceb-ab76-1e1fcca9b3ef


Oliver Charles added a comment - 22/Sep/11 02:23 PM

I'll run the script now and clean up remaining ones. Hopefully this will be enough to finally close this problem!


Oliver Charles added a comment - 22/Sep/11 02:42 PM

Ran the script, that recording is gone, along with a staggering 5171 other recordings


Oliver Charles added a comment - 22/Sep/11 02:42 PM

Note that the script does not remove recordings that have any information at all attached to them - even user ratings, so I imagine we still have orphans.


Ross Collins added a comment - 22/Sep/11 03:15 PM

Thanks - I've noticed that one of the orphaned recordings from this release that never entered the database was not deleted because someone had added a PUID to it - despite it not being attached to any releases! Weird. http://musicbrainz.org/recording/c7ce6dad-7c0f-407d-bdc7-d9985d707ac5


voiceinsideyou added a comment - 22/Sep/11 03:32 PM

One thing I've learnt in my 5 years at MusicBrainz is that people will tag and rename their entire collection, without manually verifying, against any ol' bunch of crap. And then submit the PUIDs, thinking they are helping. Welcome to the crowd!

Other relevant facts - Picard can tag standalone recordings, and taglookup was giving ridiculous results prior to most recent release. So it's possible this was the best match :-/

Going forward, what's the story here? There's still a chance of new orphaned recordings here if they have PUIDs or ratings attached and then the edit is rejected? Or that comment only applies to the cleanup script?


Luca Salini added a comment - 22/Sep/11 05:01 PM

Would it be possible to run the script in spite of existing PUIDs or ratings or do we need a report for catching those empty recordings?


Oliver Charles added a comment - 22/Sep/11 05:32 PM - edited

@Ross: That release probably existing once, but the edit was cancelled or rejected.

My thoughts with keeping this data around is that it should be merged, rather than deleted. A report is probably the best way to sort that out.

@Voice: that comment only applies to the cleanup script. From this point on, it shouldn't be created orphans (unless someone adds ARs to the recordings)


Ross Collins added a comment - 22/Sep/11 05:46 PM

The release existed briefly with new recordings, by they were quickly swapped to existing recordings, leaving the new recordings orphaned. Looking at the edit history, the PUID was assigned at a time when the recording was orphaned, which means voiceinsideyou was right about Picard not giving the best possible matches and users not paying attention.

It would be good to merge in this case, but is it likely we will manage to merge all of these orphans before they get incorrectly integrated into people's collections via Picard?


Ross Collins added a comment - 14/Oct/11 09:34 PM

I'm still finding orphaned recordings without any relationships, e.g. all these:

http://musicbrainz.org/artist/78ce36c0-0447-4231-9d57-c6435c811aa9/recordings

Any ideas why?


voiceinsideyou added a comment - 15/Oct/11 02:35 AM - edited

@Ross: This does seem to be a bug I think. The release edit was voted down only 12 hours ago (it's still in indexed search results at time of writing... search server indexes not updating again?) http://musicbrainz.org/edit/15289833


voiceinsideyou added a comment - 15/Oct/11 02:39 AM

Recordings from http://musicbrainz.org/edit/15286443 have similar problem...


Oliver Charles added a comment - 19/Oct/11 10:50 AM

One more fix in 830991b


Ross Collins added a comment - 26/Oct/11 05:23 AM

Thanks Oliver for fixing the ones I mentioned, but I'm still finding orphaned recordings. Did these just fall through the gaps?

http://musicbrainz.org/recording/44092b62-845b-4c90-a05c-25180ab68055

http://musicbrainz.org/recording/8e35eeba-4819-4739-a9a4-79b119acfb2a


voiceinsideyou added a comment - 27/Oct/11 03:44 AM

Maybe the script needs to be run again to clean up orphans created from the more recent bug?


Oliver Charles added a comment - 01/Nov/11 01:51 PM

The script has been ran again. The recordings Ross mentioned were created on the 9th Oct, so I wonder if that was too early for the changes to catch this? Please continue to report any oddities you find!


Philip Jägenstedt added a comment - 20/Jul/12 03:43 PM

I filed MBS-5035 for a similar issue which remains after this fix.