[PR #15652] create: keep pending blobs fresh until manifest write #61943

Open
opened 2026-04-29 16:55:09 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/15652
Author: @shaun0927
Created: 4/17/2026
Status: 🔄 Open

Base: mainHead: create-keepalive-pending-blobs


📝 Commits (2)

  • 22f9d8a Prevent long-running create imports from aging into GC
  • 97f1c36 create: track base layers before per-iteration quantization

📊 Changes

5 files changed (+197 additions, -4 deletions)

View changed files

manifest/keepalive.go (+94 -0)
manifest/keepalive_test.go (+9 -0)
📝 server/create.go (+22 -0)
📝 server/images_test.go (+52 -0)
📝 x/create/create.go (+20 -4)

📄 Description

Summary

Fixes #15651

This changes Ollama to keep in-flight create blobs fresh until the manifest is written, so long-running create/import paths do not age into GC eligibility before they are referenced by a manifest.

The scope stays intentionally narrow:

  • add a small manifest layer keepalive helper that periodically refreshes tracked blob mtimes
  • track active create blobs in server/create.go
  • track active safetensors-import blobs in x/create/create.go
  • add regression coverage for the prune/keepalive interaction

I chose this direction because it matches the existing mtime-based GC mechanism instead of introducing a broader pending-manifest index or new on-disk state in the first fix.

Testing

go test ./manifest ./server ./x/create -count=1

🔄 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/15652 **Author:** [@shaun0927](https://github.com/shaun0927) **Created:** 4/17/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `create-keepalive-pending-blobs` --- ### 📝 Commits (2) - [`22f9d8a`](https://github.com/ollama/ollama/commit/22f9d8a6597f4e607e98cb5dd69f0ddaa5c39c1d) Prevent long-running create imports from aging into GC - [`97f1c36`](https://github.com/ollama/ollama/commit/97f1c36428eb7f31254d219e8ab5778b0febd884) create: track base layers before per-iteration quantization ### 📊 Changes **5 files changed** (+197 additions, -4 deletions) <details> <summary>View changed files</summary> ➕ `manifest/keepalive.go` (+94 -0) ➕ `manifest/keepalive_test.go` (+9 -0) 📝 `server/create.go` (+22 -0) 📝 `server/images_test.go` (+52 -0) 📝 `x/create/create.go` (+20 -4) </details> ### 📄 Description ## Summary Fixes #15651 This changes Ollama to keep in-flight create blobs fresh until the manifest is written, so long-running create/import paths do not age into GC eligibility before they are referenced by a manifest. The scope stays intentionally narrow: - add a small manifest layer keepalive helper that periodically refreshes tracked blob mtimes - track active create blobs in `server/create.go` - track active safetensors-import blobs in `x/create/create.go` - add regression coverage for the prune/keepalive interaction I chose this direction because it matches the existing mtime-based GC mechanism instead of introducing a broader pending-manifest index or new on-disk state in the first fix. ## Testing ```shell go test ./manifest ./server ./x/create -count=1 ``` --- <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:55:09 -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#61943