[PR #16123] [CLOSED] Fix migration batching and folder refresh recursion #14533

Closed
opened 2026-02-07 07:31:21 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/16123
Author: @ZeusCraft10
Created: 1/27/2026
Status: Closed

Base: masterHead: fix/db-migration-recursion


📝 Commits (2)

  • 74f13b9 Add Cursor rules for Jellyfin project
  • 3df7a05 Fix migration batching and folder refresh recursion

📊 Changes

13 files changed (+1509 additions, -27 deletions)

View changed files

.cursor/rules/README.md (+102 -0)
.cursor/rules/VERIFICATION.md (+119 -0)
.cursor/rules/controller-patterns.mdc (+123 -0)
.cursor/rules/csharp-standards.mdc (+160 -0)
.cursor/rules/database-conventions.mdc (+149 -0)
.cursor/rules/dependency-injection.mdc (+140 -0)
.cursor/rules/error-handling.mdc (+203 -0)
.cursor/rules/logging-conventions.mdc (+157 -0)
.cursor/rules/project-overview.mdc (+97 -0)
.cursor/rules/testing-patterns.mdc (+156 -0)
📝 .gitignore (+3 -0)
📝 Jellyfin.Server/Migrations/Routines/MigrateLibraryDb.cs (+85 -21)
📝 MediaBrowser.Controller/Entities/Folder.cs (+15 -6)

📄 Description

Summary

  • Batch library.db migration inserts to keep memory use steady and avoid OOMs on large libraries.
  • Reload child lists safely, guard recursion, and skip parent/self cycles during folder metadata refresh to prevent stack overflows and redundant work.
  • Let OOM/StackOverflow exceptions bubble up for accurate crash reporting.

Test Plan

  • dotnet build Jellyfin.Server/Jellyfin.Server.csproj

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/jellyfin/jellyfin/pull/16123 **Author:** [@ZeusCraft10](https://github.com/ZeusCraft10) **Created:** 1/27/2026 **Status:** ❌ Closed **Base:** `master` ← **Head:** `fix/db-migration-recursion` --- ### 📝 Commits (2) - [`74f13b9`](https://github.com/jellyfin/jellyfin/commit/74f13b951766add0bf6e15165cf169c0e81c2f83) Add Cursor rules for Jellyfin project - [`3df7a05`](https://github.com/jellyfin/jellyfin/commit/3df7a0551897a497778318c98934c992fca7e384) Fix migration batching and folder refresh recursion ### 📊 Changes **13 files changed** (+1509 additions, -27 deletions) <details> <summary>View changed files</summary> ➕ `.cursor/rules/README.md` (+102 -0) ➕ `.cursor/rules/VERIFICATION.md` (+119 -0) ➕ `.cursor/rules/controller-patterns.mdc` (+123 -0) ➕ `.cursor/rules/csharp-standards.mdc` (+160 -0) ➕ `.cursor/rules/database-conventions.mdc` (+149 -0) ➕ `.cursor/rules/dependency-injection.mdc` (+140 -0) ➕ `.cursor/rules/error-handling.mdc` (+203 -0) ➕ `.cursor/rules/logging-conventions.mdc` (+157 -0) ➕ `.cursor/rules/project-overview.mdc` (+97 -0) ➕ `.cursor/rules/testing-patterns.mdc` (+156 -0) 📝 `.gitignore` (+3 -0) 📝 `Jellyfin.Server/Migrations/Routines/MigrateLibraryDb.cs` (+85 -21) 📝 `MediaBrowser.Controller/Entities/Folder.cs` (+15 -6) </details> ### 📄 Description ## Summary - Batch library.db migration inserts to keep memory use steady and avoid OOMs on large libraries. - Reload child lists safely, guard recursion, and skip parent/self cycles during folder metadata refresh to prevent stack overflows and redundant work. - Let OOM/StackOverflow exceptions bubble up for accurate crash reporting. ## Related Issues - #15101 ## Test Plan - dotnet build Jellyfin.Server/Jellyfin.Server.csproj --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-07 07:31:21 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#14533