-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Fix stackoverflow in MediaSourceCount #12907
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix stackoverflow in MediaSourceCount #12907
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like that the incorrect data just gets ignored.
IMO a better solution would be throwing in the PrimaryVersionId setter when the Video it points to also has a PrimaryVersionId. This way the culprit (probably a plugin) can get blamed and it can be fixed instead of covered up.
Isnt the issue here, thats why its recursive, the issue is that most likely there is a video that PrimaryId is itself. I agree that this should be better handled on setter and never create bad data in the first place, but then we also need to migrate bad data as well which is more then just this quickfix. |
Even easier to check, don't even need to interact with the DB, it's basically free.
If it's like you say, PrimaryId == Id a migration isn't too hard
If this is just a "quick fix" it shouldn't be backported but fixed properly in master. |
unfucked version of #12904