Warning for Unstable - EFCore refactoring is coming
Unstable users: we are planning to merge our pending EFCore conversion of library.db
in the next couple of weeks. It is imperative that all unstable users understand what is going on, what the plan is, and how to mitigate issues that will inevitably arise from this. Stable (10.y.z
) users require no action.
Unstable builds are currently paused for roughly 4 weeks post-release of 10.10.0, and during this time, we plan to merge these extensive database changes. There will be breakage - bugs, fixes, and database migrations - during this time. This is your fair warning to either (a) prepare yourself with a good backup and recovery strategy and disable automatic upgrades; or (b) move off of unstable onto 10.10.0 stable until the dust settles (but, please don't, as we need your help to test!)
Please read on for a more detailed overview if you are interested.
- Joshua
What is EFCore, and why are we migrating to it?
EFCore is the C#/.NET database handling framework, which simplifies database query handling in the Jellyfin codebase.
Our original database code was written by Emby in a time long before .NET Core existed, when Mono ruled the world in terms of cross-platform C# compatibility. As such, it handled the database poorly: SQLite queries embedded directly in the code, and a fairly horrific schema with no migration capabilities. This has caused us a lot of problems over the years as we try to change and improve the codebase and add new features, and as such, the team began migrating to EFCore quite a while ago.
We were able to move many of the databases quickly, mostly due to the diligent work of @BarronPM; those have been live for several major releases now. But the Library database has remained as it was, due to its massive complexity and exceptionally poor schema. This has caused a lot of problems, for instance very slow search, problems adding new media types (or deprecating old ones), and lots of complexity inside the codebase around handling "non-standard" (i.e. not Movies/TV Shows/Music Albums) media types, resulting in bugs.
Now, thanks to @JPVenson, we finally have the library database EFCore implementation ready to go. But there is a big catch.
There Will Be Bugs
Once we merge this massive change set, there will be bugs. This is certain. And these bugs may completely trash your library database. So first and foremost, it is incredibly important that everyone running the Unstable builds understands that this is coming and how to prepare yourself.