mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-27 10:00:53 +01:00
The FixIncorrectOwnerIdRelationships migration deletes all duplicate items in a single DeleteItemsUnsafeFast -> DeleteItem(ids) call. Inside DeleteItem, the owned-extras lookup used a raw HashSet.Contains, which EF inlines as one SQL variable per id and overflows SQLite's variable limit on large libraries. Use WhereOneOrMany so the id set is bound as a single json_each parameter, like the rest of the method, making bulk deletes work for unlimited library sizes.