From 46288924a2ad8444201c16a1905192005b3b60b8 Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Fri, 22 Aug 2025 18:29:26 +0200 Subject: [PATCH] Update prune.py --- backend/open_webui/routers/prune.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/backend/open_webui/routers/prune.py b/backend/open_webui/routers/prune.py index c5377d79e9..3d60e19a61 100644 --- a/backend/open_webui/routers/prune.py +++ b/backend/open_webui/routers/prune.py @@ -421,8 +421,7 @@ class ChromaDatabaseCleaner(VectorDatabaseCleaner): conn.execute("DROP TABLE IF EXISTS temp_valid_fts") return -1 # Signal FTS cleanup was skipped - # Step 5: Atomic FTS cleanup operation - conn.execute("BEGIN IMMEDIATE") + # Step 5: FTS cleanup operation (already in transaction) try: # Delete all FTS content conn.execute("DELETE FROM embedding_fulltext_search") @@ -440,13 +439,8 @@ class ChromaDatabaseCleaner(VectorDatabaseCleaner): # Rebuild FTS index conn.execute("INSERT INTO embedding_fulltext_search(embedding_fulltext_search) VALUES('rebuild')") - # Commit the atomic operation - conn.execute("COMMIT") - except Exception as e: - # Rollback on any failure to preserve existing FTS data - conn.execute("ROLLBACK") - log.error(f"FTS cleanup failed, rolled back changes: {e}") + log.error(f"FTS cleanup failed: {e}") conn.execute("DROP TABLE IF EXISTS temp_valid_fts") return -1 # Signal FTS cleanup failed