[PR #471] [MERGED] fix: prevent deadlock when trying to delete LDAP users #786

Closed
opened 2025-10-09 16:57:12 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/pocket-id/pocket-id/pull/471
Author: @ItalyPaleAle
Created: 4/22/2025
Status: Merged
Merged: 4/22/2025
Merged by: @stonith404

Base: mainHead: fixes-20240421


📝 Commits (1)

  • ad595b9 fix: prevent deadlock when trying to delete LDAP users

📊 Changes

2 files changed (+18 additions, -32 deletions)

View changed files

📝 backend/internal/service/ldap_service.go (+12 -7)
📝 backend/internal/service/user_service.go (+6 -25)

📄 Description

Fixup from #437
Reverted LDAP to use deleteUserInternal which accepts an existing transaction. Without that, it would cause a deadlock in SQLite, as we can't start a transaction if there's another one active already

Also renamed DisableUser to disableUserInternal since it's another "internal" method


🔄 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/pocket-id/pocket-id/pull/471 **Author:** [@ItalyPaleAle](https://github.com/ItalyPaleAle) **Created:** 4/22/2025 **Status:** ✅ Merged **Merged:** 4/22/2025 **Merged by:** [@stonith404](https://github.com/stonith404) **Base:** `main` ← **Head:** `fixes-20240421` --- ### 📝 Commits (1) - [`ad595b9`](https://github.com/pocket-id/pocket-id/commit/ad595b93076bdec4121c6c31bded20343793b251) fix: prevent deadlock when trying to delete LDAP users ### 📊 Changes **2 files changed** (+18 additions, -32 deletions) <details> <summary>View changed files</summary> 📝 `backend/internal/service/ldap_service.go` (+12 -7) 📝 `backend/internal/service/user_service.go` (+6 -25) </details> ### 📄 Description Fixup from #437 Reverted LDAP to use `deleteUserInternal` which accepts an existing transaction. Without that, it would cause a deadlock in SQLite, as we can't start a transaction if there's another one active already Also renamed `DisableUser` to `disableUserInternal` since it's another "internal" method --- <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 2025-10-09 16:57:12 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pocket-id-pocket-id-2#786