[PR #15628] [MERGED] create: avoid gc race with create #61936

Closed
opened 2026-04-29 16:54:45 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/15628
Author: @dhiltgen
Created: 4/16/2026
Status: Merged
Merged: 4/16/2026
Merged by: @dhiltgen

Base: mainHead: multi-server-gc


📝 Commits (1)

  • 81b2c6f create: avoid gc race with create

📊 Changes

3 files changed (+75 additions, -1 deletions)

View changed files

📝 manifest/layer.go (+12 -0)
📝 server/images.go (+19 -1)
📝 server/images_test.go (+44 -0)

📄 Description

If you have a long running create, and start another ollama server with the same model dir, the GC algorithm deletes the pending blobs and breaks the create. This adds a 1h grace period to avoid deleting in-flight creation operations.


🔄 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/ollama/ollama/pull/15628 **Author:** [@dhiltgen](https://github.com/dhiltgen) **Created:** 4/16/2026 **Status:** ✅ Merged **Merged:** 4/16/2026 **Merged by:** [@dhiltgen](https://github.com/dhiltgen) **Base:** `main` ← **Head:** `multi-server-gc` --- ### 📝 Commits (1) - [`81b2c6f`](https://github.com/ollama/ollama/commit/81b2c6fea959baab3d9a65ebec7a13e2ff4557ae) create: avoid gc race with create ### 📊 Changes **3 files changed** (+75 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `manifest/layer.go` (+12 -0) 📝 `server/images.go` (+19 -1) 📝 `server/images_test.go` (+44 -0) </details> ### 📄 Description If you have a long running create, and start another ollama server with the same model dir, the GC algorithm deletes the pending blobs and breaks the create. This adds a 1h grace period to avoid deleting in-flight creation operations. --- <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-04-29 16:54:45 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#61936