[PR #14047] [MERGED] Add multiple options for internal locking #13808

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

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/14047
Author: @JPVenson
Created: 5/2/2025
Status: Merged
Merged: 6/4/2025
Merged by: @crobibero

Base: masterHead: feature/ExtendedOptimisticConcurrencyLocking


📝 Commits (10+)

  • 8915adf Add multiple options for internal locking
  • 0fb86ed Ensure lock cleanup on error
  • 515979a cleanup
  • d58edc1 Fix copypast error
  • b872b04 clarified locking behavior
  • 4b5f1ee Also handle async save operations
  • 3beec63 Update src/Jellyfin.Database/Jellyfin.Database.Implementations/Locking/PessimisticLockBehavior.cs
  • 82976ea Update DatabaseLockingBehaviorTypes.cs
  • d493528 Extended logging for locking behaviors
  • c8440af Merge branch 'feature/ExtendedOptimisticConcurrencyLocking' of https://github.com/JPVenson/jellyfin into feature/ExtendedOptimisticConcurrencyLocking

📊 Changes

12 files changed (+612 additions, -13 deletions)

View changed files

📝 Directory.Packages.props (+1 -0)
📝 Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs (+17 -0)
📝 Jellyfin.Server.Implementations/Item/PeopleRepository.cs (+9 -4)
📝 src/Jellyfin.Database/Jellyfin.Database.Implementations/DbConfiguration/DatabaseConfigurationOptions.cs (+6 -0)
src/Jellyfin.Database/Jellyfin.Database.Implementations/DbConfiguration/DatabaseLockingBehaviorTypes.cs (+22 -0)
📝 src/Jellyfin.Database/Jellyfin.Database.Implementations/Jellyfin.Database.Implementations.csproj (+1 -0)
📝 src/Jellyfin.Database/Jellyfin.Database.Implementations/JellyfinDbContext.cs (+47 -8)
src/Jellyfin.Database/Jellyfin.Database.Implementations/Locking/IEntityFrameworkCoreLockingBehavior.cs (+32 -0)
src/Jellyfin.Database/Jellyfin.Database.Implementations/Locking/NoLockBehavior.cs (+41 -0)
src/Jellyfin.Database/Jellyfin.Database.Implementations/Locking/OptimisticLockBehavior.cs (+137 -0)
src/Jellyfin.Database/Jellyfin.Database.Implementations/Locking/PessimisticLockBehavior.cs (+296 -0)
📝 src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/SqliteDesignTimeJellyfinDbFactory.cs (+3 -1)

📄 Description

Add options for multiple query locking behaviors and query congestion logging for pessimistic mode

Fixes locking up the server when viewing faviorites

fixes https://github.com/jellyfin/jellyfin/issues/13708
fixes https://github.com/jellyfin/jellyfin/issues/13873
fixes #13508


🔄 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/14047 **Author:** [@JPVenson](https://github.com/JPVenson) **Created:** 5/2/2025 **Status:** ✅ Merged **Merged:** 6/4/2025 **Merged by:** [@crobibero](https://github.com/crobibero) **Base:** `master` ← **Head:** `feature/ExtendedOptimisticConcurrencyLocking` --- ### 📝 Commits (10+) - [`8915adf`](https://github.com/jellyfin/jellyfin/commit/8915adf7f4e23b6ca7c2561ca6020b54f36a13c7) Add multiple options for internal locking - [`0fb86ed`](https://github.com/jellyfin/jellyfin/commit/0fb86ed7e9ecc4ac449558cf267e84cc1bffd50d) Ensure lock cleanup on error - [`515979a`](https://github.com/jellyfin/jellyfin/commit/515979a7ffbe5507177cc9b6faba320d9ea94faa) cleanup - [`d58edc1`](https://github.com/jellyfin/jellyfin/commit/d58edc1ad847376ee415b85d4423574e0265a301) Fix copypast error - [`b872b04`](https://github.com/jellyfin/jellyfin/commit/b872b045630becaedf7887eb6b8bb3ccf30c83e9) clarified locking behavior - [`4b5f1ee`](https://github.com/jellyfin/jellyfin/commit/4b5f1ee64a5c18bb1b75ce25d361bbddd37acdb3) Also handle async save operations - [`3beec63`](https://github.com/jellyfin/jellyfin/commit/3beec63d1b420fb03d9e05ad27fe72bfde447e19) Update src/Jellyfin.Database/Jellyfin.Database.Implementations/Locking/PessimisticLockBehavior.cs - [`82976ea`](https://github.com/jellyfin/jellyfin/commit/82976eabf44c716fbdfa32a56f70e002c3f16513) Update DatabaseLockingBehaviorTypes.cs - [`d493528`](https://github.com/jellyfin/jellyfin/commit/d493528829f9147ab7822ec5ea2c71eb2fa325c9) Extended logging for locking behaviors - [`c8440af`](https://github.com/jellyfin/jellyfin/commit/c8440af37e52a6bd9e3b9227076acc7f3294ad12) Merge branch 'feature/ExtendedOptimisticConcurrencyLocking' of https://github.com/JPVenson/jellyfin into feature/ExtendedOptimisticConcurrencyLocking ### 📊 Changes **12 files changed** (+612 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `Directory.Packages.props` (+1 -0) 📝 `Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs` (+17 -0) 📝 `Jellyfin.Server.Implementations/Item/PeopleRepository.cs` (+9 -4) 📝 `src/Jellyfin.Database/Jellyfin.Database.Implementations/DbConfiguration/DatabaseConfigurationOptions.cs` (+6 -0) ➕ `src/Jellyfin.Database/Jellyfin.Database.Implementations/DbConfiguration/DatabaseLockingBehaviorTypes.cs` (+22 -0) 📝 `src/Jellyfin.Database/Jellyfin.Database.Implementations/Jellyfin.Database.Implementations.csproj` (+1 -0) 📝 `src/Jellyfin.Database/Jellyfin.Database.Implementations/JellyfinDbContext.cs` (+47 -8) ➕ `src/Jellyfin.Database/Jellyfin.Database.Implementations/Locking/IEntityFrameworkCoreLockingBehavior.cs` (+32 -0) ➕ `src/Jellyfin.Database/Jellyfin.Database.Implementations/Locking/NoLockBehavior.cs` (+41 -0) ➕ `src/Jellyfin.Database/Jellyfin.Database.Implementations/Locking/OptimisticLockBehavior.cs` (+137 -0) ➕ `src/Jellyfin.Database/Jellyfin.Database.Implementations/Locking/PessimisticLockBehavior.cs` (+296 -0) 📝 `src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/SqliteDesignTimeJellyfinDbFactory.cs` (+3 -1) </details> ### 📄 Description Add options for multiple query locking behaviors and query congestion logging for pessimistic mode Fixes locking up the server when viewing faviorites fixes https://github.com/jellyfin/jellyfin/issues/13708 fixes https://github.com/jellyfin/jellyfin/issues/13873 fixes #13508 --- <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:19:32 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#13808