Files
LocalAI/core/services
Ettore Di Giacinto 50177f8e2b fix(studio): stage workspace uploads outside the revision lock
With PostgreSQL and a filesystem blob store, Put and CommitUpper took
the global revision row lock before reading the upload. A slow or large
upload then blocked every other write and purge and kept a pool
connection for its whole duration.

Split the filesystem blob Put into Stage (read, hash, fsync a temp
file) and Publish (rename). The workspace stages first, takes the lock,
then publishes, so a purge still cannot remove a blob between
publication and the row that references it. Publish syncs only the
folder that gains the name; newly created folders are already synced by
mkdir.

Assisted-by: Claude Code:claude-sonnet-5-5
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
2026-11-03 08:38:35 +00:00
..
2026-03-30 00:47:27 +02:00