mirror of
https://github.com/mudler/LocalAI.git
synced 2026-09-30 10:04:32 -04:00
SyncedMap.Set and Delete changed memory before they wrote the Store. When the write failed they returned the error, but the unpersisted value stayed in memory. Callers that re-read the map then applied it again. The failover manager rolled back a failed pin, but its periodic pin re-sync read the pin back from the map and re-applied it on that frontend until the database came back. Write the Store first and change memory only after it succeeds. A failed Set or Delete now leaves memory and peers as they were, so the map always matches what the Store holds. This also stops a failed create of a fine-tune, quantization or agent task from leaving an orphan entry that the API had reported as failed. Signed-off-by: Ettore Di Giacinto <mudler@localai.io> Assisted-by: Claude:claude-opus-5-5 [Claude Code]