[PR #24890] [CLOSED] fix: prevent orphaned knowledge files by ensuring atomic upload-process-link chain (#24807) #131577

Closed
opened 2026-05-21 17:15:21 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/24890
Author: @paulxg12
Created: 5/18/2026
Status: Closed

Base: devHead: fix-knowledge-orphan


📝 Commits (1)

  • 8fd987e fix: prevent orphaned knowledge files by ensuring atomic upload-process-link chain (#24807)

📊 Changes

297 files changed (+101570 additions, -16347 deletions)

View changed files

📝 .github/ISSUE_TEMPLATE/feature_request.yaml (+40 -34)
📝 .github/dependabot.yml (+5 -10)
📝 .github/pull_request_template.md (+34 -33)
.github/workflows/backend.yaml (+0 -40)
.github/workflows/build-release.yml (+61 -0)
.github/workflows/docker-build.yaml (+917 -0)
.github/workflows/docker.yaml (+0 -311)
.github/workflows/format-backend.yaml (+46 -0)
.github/workflows/format-build-frontend.yaml (+65 -0)
.github/workflows/frontend.yaml (+0 -63)
.github/workflows/integration-test.disabled (+255 -0)
.github/workflows/release.yml (+0 -69)
📝 backend/open_webui/config.py (+3219 -2984)
📝 backend/open_webui/constants.py (+3 -5)
📝 backend/open_webui/env.py (+472 -408)
📝 backend/open_webui/functions.py (+21 -15)
backend/open_webui/internal/config.py (+0 -258)
📝 backend/open_webui/internal/db.py (+54 -19)
backend/open_webui/internal/migrations/001_initial_schema.py (+253 -0)
backend/open_webui/internal/migrations/002_add_local_sharing.py (+45 -0)

...and 80 more files

📄 Description

Description

Closes #24807 — Knowledge upload can leave processed files unlinked if the user navigates away before final linking.

Root cause: Upload pipeline did linking AFTER processing. If user navigated away during embedding step, files were orphaned.

Fix: Reversed order — link first (fast), process second (slow). Rollback link on processing failure.

Contributor License Agreement

I confirm that I have read and agree to the terms of the Contributor License Agreement as described in the CONTRIBUTING.md of this repository.


🔄 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/open-webui/open-webui/pull/24890 **Author:** [@paulxg12](https://github.com/paulxg12) **Created:** 5/18/2026 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `fix-knowledge-orphan` --- ### 📝 Commits (1) - [`8fd987e`](https://github.com/open-webui/open-webui/commit/8fd987e697a19a28ae534459f80005202d618fdf) fix: prevent orphaned knowledge files by ensuring atomic upload-process-link chain (#24807) ### 📊 Changes **297 files changed** (+101570 additions, -16347 deletions) <details> <summary>View changed files</summary> 📝 `.github/ISSUE_TEMPLATE/feature_request.yaml` (+40 -34) 📝 `.github/dependabot.yml` (+5 -10) 📝 `.github/pull_request_template.md` (+34 -33) ➖ `.github/workflows/backend.yaml` (+0 -40) ➕ `.github/workflows/build-release.yml` (+61 -0) ➕ `.github/workflows/docker-build.yaml` (+917 -0) ➖ `.github/workflows/docker.yaml` (+0 -311) ➕ `.github/workflows/format-backend.yaml` (+46 -0) ➕ `.github/workflows/format-build-frontend.yaml` (+65 -0) ➖ `.github/workflows/frontend.yaml` (+0 -63) ➕ `.github/workflows/integration-test.disabled` (+255 -0) ➖ `.github/workflows/release.yml` (+0 -69) 📝 `backend/open_webui/config.py` (+3219 -2984) 📝 `backend/open_webui/constants.py` (+3 -5) 📝 `backend/open_webui/env.py` (+472 -408) 📝 `backend/open_webui/functions.py` (+21 -15) ➖ `backend/open_webui/internal/config.py` (+0 -258) 📝 `backend/open_webui/internal/db.py` (+54 -19) ➕ `backend/open_webui/internal/migrations/001_initial_schema.py` (+253 -0) ➕ `backend/open_webui/internal/migrations/002_add_local_sharing.py` (+45 -0) _...and 80 more files_ </details> ### 📄 Description ## Description Closes #24807 — Knowledge upload can leave processed files unlinked if the user navigates away before final linking. **Root cause**: Upload pipeline did linking AFTER processing. If user navigated away during embedding step, files were orphaned. **Fix**: Reversed order — link first (fast), process second (slow). Rollback link on processing failure. ## Contributor License Agreement I confirm that I have read and agree to the terms of the Contributor License Agreement as described in the CONTRIBUTING.md of this repository. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-21 17:15:21 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#131577