Episodes Unlinked from Season/Series
Issue: Episodes Unlinked from Season/Series
Status: Resolved
1. Executive Summary
We identified the cause of the issue where certain UFC episodes became unlinked from their respective Season and Series following metadata updates.
The issue was caused by how our system processed specific linkage removal instructions included in bulk metadata update files. Under certain conditions, removing a linkage unintentionally triggered additional hierarchy unlinking for Episodes.
A fix has been implemented to prevent this from occurring again. No further cascading unlinking will happen outside of intended parent-child relationships.
2. What Happened
After episodes were properly created and approved, subsequent metadata updates (titles/descriptions) were uploaded via bulk templates.
Within those updates, certain records included a linkage instruction flagged as "deleted": true.
When our Record Service processed this instruction:
It correctly interpreted it as a request to remove a linkage.
However, due to legacy business logic specific to Episodes, the system also removed the Episode’s association to its Season and Series.
This behavior was not limited to Season/Series operations and could be triggered indirectly during other linkage updates.
As a result, some episodes became detached from their Season and Series.
3. Why It Did Not Affect All UFC Titles
Although the UFC titles were created and updated in a similar manner, the issue only occurred when:
The uploaded payload included a linkage marked as "deleted": true
The linkage mutation logic was executed in a context that triggered the Episode-specific cascading behavior
Where that condition was not present (e.g., certain language variants), linkages remained intact.
4. Root Cause
The root cause was:
A system logic gap in the Record Service that allowed Episode unlink actions to cascade to Season and Series relationships without validating the context of the parent record.
In short, the system lacked sufficient safeguards to ensure that unlink operations were scoped only to the intended relationship.
5. Resolution
We have implemented a targeted safeguard in the Record Service:
Cascading unlink behavior is now restricted only to valid parent categories (Show or Season).
If a linkage removal involves an Episode under any other category (e.g., Report Collection), only that specific relationship is removed.
Season and Series associations are now protected from unintended unlinking.
This prevents structural hierarchy breakage moving forward.
6. Data Integrity
The issue has been identified at the service level.
A fix has been deployed.
Existing affected episodes can be safely relinked.
No ongoing risk remains under the corrected logic.
7. Preventive Actions
To prevent recurrence:
Category-based validation has been added to linkage mutation logic.
Guardrails now ensure unlink actions are context-aware.
Additional test coverage has been implemented for Episode hierarchy operations.
8. Conclusion
The unlinking issue was caused by unintended cascading behavior during bulk metadata updates involving Episode records.
The logic has been corrected to ensure unlink actions are strictly scoped and cannot impact Season/Series hierarchies unless explicitly intended.
The system is now protected against this scenario.
Last updated

