[PR #381] [MERGED] retry on unauthorized chunk push #10129

Closed
opened 2026-04-12 22:52:23 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/381
Author: @mxyng
Created: 8/18/2023
Status: Merged
Merged: 8/18/2023
Merged by: @mxyng

Base: mainHead: mxyng/fix-push-chunks


📝 Commits (1)

  • 3b49315 retry on unauthorized chunk push

📊 Changes

1 file changed (+24 additions, -45 deletions)

View changed files

📝 server/images.go (+24 -45)

📄 Description

The token printed for authorized requests has a lifetime of 1h. If an upload exceeds 1h, a chunk push will fail since the token is only created on a "start upload" request.

This replaces the Pipe with SectionReader which is simpler and implements Seek, a requirement for makeRequestWithRetry. This is slightly worse than using a Pipe since the progress update is directly tied to the chunk size instead of controlled separately, i.e. increasing chunk size will decrease how often the client gets an progress update


🔄 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/381 **Author:** [@mxyng](https://github.com/mxyng) **Created:** 8/18/2023 **Status:** ✅ Merged **Merged:** 8/18/2023 **Merged by:** [@mxyng](https://github.com/mxyng) **Base:** `main` ← **Head:** `mxyng/fix-push-chunks` --- ### 📝 Commits (1) - [`3b49315`](https://github.com/ollama/ollama/commit/3b49315f971dca74cc3109c9362e93e70812df8c) retry on unauthorized chunk push ### 📊 Changes **1 file changed** (+24 additions, -45 deletions) <details> <summary>View changed files</summary> 📝 `server/images.go` (+24 -45) </details> ### 📄 Description The token printed for authorized requests has a lifetime of 1h. If an upload exceeds 1h, a chunk push will fail since the token is only created on a "start upload" request. This replaces the Pipe with SectionReader which is simpler and implements Seek, a requirement for makeRequestWithRetry. This is slightly worse than using a Pipe since the progress update is directly tied to the chunk size instead of controlled separately, i.e. increasing chunk size will decrease how often the client gets an progress update --- <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-12 22:52:23 -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#10129