[PR #9923] [MERGED] server/internal/client/ollama: persist through chunk download errors #59793

Closed
opened 2026-04-29 14:43:52 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/9923
Author: @bmizerany
Created: 3/21/2025
Status: Merged
Merged: 3/21/2025
Merged by: @bmizerany

Base: mainHead: bmizerany/chunksums-wait-after-failure


📝 Commits (1)

  • 3a2914d server/internal/client/ollama: persist through chunk download errors

📊 Changes

3 files changed (+89 additions, -36 deletions)

View changed files

📝 server/internal/client/ollama/registry.go (+40 -21)
📝 server/internal/client/ollama/registry_test.go (+29 -2)
📝 server/internal/registry/server.go (+20 -13)

📄 Description

This changes the behavior of the registry client to persist through
chunk download errors. The client will no longer bring down all
in-flight chunk downloads if one of them fails. Instead, it will
continue to download the other chunks, and once all of them are
complete, it will return an error if any of them failed. Clients can use
the tracing feature to get updates on the progress of each chunk and
cancel their context if they want to stop the download early.

This also changes the progress reporting behavior. Now, the progress
reporting will report, per read, the number of bytes received for the
read. Previously, it would report the total number of bytes received for
the entire blob. This caused issues when the blob was downloaded in a
single chunk, as the progress would not be updated until the entire blob
was downloaded.

Also, provide an example of how to use the tracing feature to cancel the
download early should clients want to do that.

Also, using 'go run .' now sets the Ollama version "v0.0.0" instead of
"(devel)" to avoid issues with the registry server that were encountered
and blocking some testing of this change.


🔄 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/9923 **Author:** [@bmizerany](https://github.com/bmizerany) **Created:** 3/21/2025 **Status:** ✅ Merged **Merged:** 3/21/2025 **Merged by:** [@bmizerany](https://github.com/bmizerany) **Base:** `main` ← **Head:** `bmizerany/chunksums-wait-after-failure` --- ### 📝 Commits (1) - [`3a2914d`](https://github.com/ollama/ollama/commit/3a2914d41e65fbe729b31e066e305ed86d221ea3) server/internal/client/ollama: persist through chunk download errors ### 📊 Changes **3 files changed** (+89 additions, -36 deletions) <details> <summary>View changed files</summary> 📝 `server/internal/client/ollama/registry.go` (+40 -21) 📝 `server/internal/client/ollama/registry_test.go` (+29 -2) 📝 `server/internal/registry/server.go` (+20 -13) </details> ### 📄 Description This changes the behavior of the registry client to persist through chunk download errors. The client will no longer bring down all in-flight chunk downloads if one of them fails. Instead, it will continue to download the other chunks, and once all of them are complete, it will return an error if any of them failed. Clients can use the tracing feature to get updates on the progress of each chunk and cancel their context if they want to stop the download early. This also changes the progress reporting behavior. Now, the progress reporting will report, per read, the number of bytes received for the read. Previously, it would report the total number of bytes received for the entire blob. This caused issues when the blob was downloaded in a single chunk, as the progress would not be updated until the entire blob was downloaded. Also, provide an example of how to use the tracing feature to cancel the download early should clients want to do that. Also, using 'go run .' now sets the Ollama version "v0.0.0" instead of "(devel)" to avoid issues with the registry server that were encountered and blocking some testing of this change. --- <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 14:43:52 -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#59793