[PR #750] [MERGED] concurrent uploads #15582

Closed
opened 2026-04-16 05:02:39 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/750
Author: @mxyng
Created: 10/10/2023
Status: Merged
Merged: 11/1/2023
Merged by: @mxyng

Base: mainHead: mxyng/concurrent-uploads


📝 Commits (4)

📊 Changes

4 files changed (+287 additions, -189 deletions)

View changed files

📝 server/download.go (+3 -2)
📝 server/images.go (+2 -60)
📝 server/routes.go (+3 -1)
📝 server/upload.go (+279 -126)

📄 Description

follow a similar pattern as downloads with some key differences:

  1. uploads parts are serialized based on a nextURL channel which informs the next part where to upload to
  2. redirects send to nextURL before following the redirect which allows parts to be uploaded concurrently
  3. progress is tracked with blobUploadWriter which tracks how many bytes per part is written. this is necessary for redirect which partially reads the initial request before following the redirect; it needs to rewind the overall progress

TODO:

  • verify calculated md5 with etag and retry the part if it differs

🔄 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/750 **Author:** [@mxyng](https://github.com/mxyng) **Created:** 10/10/2023 **Status:** ✅ Merged **Merged:** 11/1/2023 **Merged by:** [@mxyng](https://github.com/mxyng) **Base:** `main` ← **Head:** `mxyng/concurrent-uploads` --- ### 📝 Commits (4) - [`4e09aab`](https://github.com/ollama/ollama/commit/4e09aab8b992c48a5f6cf60a34e0205ac1179ea7) concurrent uploads - [`12efcbb`](https://github.com/ollama/ollama/commit/12efcbb057011896937840435f667804d8a3aee6) comments - [`186f685`](https://github.com/ollama/ollama/commit/186f6852244c421bfa95a1ab1e21986d1f33474b) retry PUT - [`115fc56`](https://github.com/ollama/ollama/commit/115fc56eb764be961b746fa69e8e02196bb7ad5c) calculate and verify md5 checksum ### 📊 Changes **4 files changed** (+287 additions, -189 deletions) <details> <summary>View changed files</summary> 📝 `server/download.go` (+3 -2) 📝 `server/images.go` (+2 -60) 📝 `server/routes.go` (+3 -1) 📝 `server/upload.go` (+279 -126) </details> ### 📄 Description follow a similar pattern as downloads with some key differences: 1. uploads parts are serialized based on a nextURL channel which informs the next part where to upload to 2. redirects send to nextURL before following the redirect which allows parts to be uploaded concurrently 3. progress is tracked with blobUploadWriter which tracks how many bytes per part is written. this is necessary for redirect which partially reads the initial request before following the redirect; it needs to rewind the overall progress TODO: - [ ] verify calculated md5 with etag and retry the part if it differs --- <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-16 05:02:39 -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#15582