[PR #526] [MERGED] feat: implement locking mechanism for concurrent plugin installation #560

Closed
opened 2026-02-16 01:16:20 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-plugin-daemon/pull/526
Author: @Mairuis
Created: 12/10/2025
Status: Merged
Merged: 12/10/2025
Merged by: @Mairuis

Base: mainHead: fix/plugin-install


📝 Commits (1)

  • 9df4c0d feat: implement locking mechanism for concurrent plugin installation and upgrade

📊 Changes

2 files changed (+50 additions, -0 deletions)

View changed files

📝 internal/service/install_plugin.go (+46 -0)
📝 internal/service/install_task_service.go (+4 -0)

📄 Description

  • add locking to prevent simultaneous installations of the same plugin
  • ensure proper unlocking of keys in case of errors during installation and upgrade
  • handle database not found error in DeletePluginInstallationItemFromTask

Description

Please provide a brief description of the changes made in this pull request.
Please also include the issue number if this is related to an issue using the format Fixes #123 or Closes #123.

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Performance improvement
  • Other

Essential Checklist

Testing

  • I have tested the changes locally and confirmed they work as expected
  • I have added unit tests where necessary and they pass successfully

Bug Fix (if applicable)

  • I have used GitHub syntax to close the related issue (e.g., Fixes #123 or Closes #123)

Additional Information

Please provide any additional context that would help reviewers understand the changes.


🔄 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/langgenius/dify-plugin-daemon/pull/526 **Author:** [@Mairuis](https://github.com/Mairuis) **Created:** 12/10/2025 **Status:** ✅ Merged **Merged:** 12/10/2025 **Merged by:** [@Mairuis](https://github.com/Mairuis) **Base:** `main` ← **Head:** `fix/plugin-install` --- ### 📝 Commits (1) - [`9df4c0d`](https://github.com/langgenius/dify-plugin-daemon/commit/9df4c0d42d49a38bb472c81d5daba6bb608b978a) feat: implement locking mechanism for concurrent plugin installation and upgrade ### 📊 Changes **2 files changed** (+50 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `internal/service/install_plugin.go` (+46 -0) 📝 `internal/service/install_task_service.go` (+4 -0) </details> ### 📄 Description * add locking to prevent simultaneous installations of the same plugin * ensure proper unlocking of keys in case of errors during installation and upgrade * handle database not found error in DeletePluginInstallationItemFromTask ## Description Please provide a brief description of the changes made in this pull request. Please also include the issue number if this is related to an issue using the format `Fixes #123` or `Closes #123`. ## Type of Change - [x] Bug fix - [ ] New feature - [ ] Refactor - [ ] Performance improvement - [ ] Other ## Essential Checklist ### Testing - [x] I have tested the changes locally and confirmed they work as expected - [x] I have added unit tests where necessary and they pass successfully ### Bug Fix (if applicable) - [ ] I have used GitHub syntax to close the related issue (e.g., `Fixes #123` or `Closes #123`) ## Additional Information Please provide any additional context that would help reviewers understand the changes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 01:16:20 -05:00
yindo closed this issue 2026-02-16 01:16:20 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-plugin-daemon#560