mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 06:03:26 -05:00
[PR #22842] [CLOSED] fix: make RedisDict.set() atomic to prevent intermittent model lookup failures #130546
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/22842
Author: @themavik
Created: 3/19/2026
Status: ❌ Closed
Base:
dev← Head:fix/22734-redisdict-atomic-set-v2📝 Commits (1)
7afeac4fix: make RedisDict.set() atomic to prevent intermittent model lookup failures📊 Changes
1 file changed (+10 additions, -6 deletions)
View changed files
📝
backend/open_webui/socket/utils.py(+10 -6)📄 Description
Summary
Fixes #22734.
Root cause:
RedisDict.set()usedDELETEfollowed byHSETin a non-transactional pipeline. A concurrentHGET/HGETALLbetween the two sees an empty hash, causing "Model not found" errors under high concurrency.Fix: Replace destructive
DELETE+HSETwith a diff-based approach using a transactional pipeline (MULTI/EXEC): onlyHDELremoved keys andHSETnew/changed keys.Changes
backend/open_webui/socket/utils.py: RewroteRedisDict.set()to use diff-based updates with a transactional pipeline.Testing
Made with Cursor
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.