[Docs] Deleting a model cancels its in-flight download - #23
Conversation
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
|
Documentation maintenance: ready. Unsuccessful content rounds: 0/3. Operational attempts: 0/3. Head: Both edits document one concern: deletion versus queued/active downloads. All claims verified against pkg/modelagent and pkg/ociobjectstore at the pinned commit: delete drops the model's queued tasks and goes to the front of the high-priority queue (gopher_task_queue.go enqueue/removeSupersededTasks); the active download's context is canceled at enqueue (gopher.go enqueueTask -> gopher_task_tracker.go beginDelete); canceled downloads skip the Failed status (gopher.go:1093); the agent passes WithSizeThreshold(BigFileSizeInMB=200, MiB-based comparison) so files under 200 MiB finish via the standard download while larger files' multipart transfers stop mid-file with part temp files and the .temp assembly file removed; GetObject runs under context.WithoutCancel so an in-flight SDK request keeps its retries and must return first; HF downloads carry an xet cancellation token polled mid-transfer. The since-v1.3/on-v1.2.2 framing matches the triggering commit c23c643 introducing BulkDownloadContext (previously no context, so OCI downloads ran to completion), corroborated by the Hugo page's long-standing Download Cancellation section. Anchor links resolve and the style follows the house conventions; no nav/redirect changes needed. Human review threads and CODEOWNER approval remain under repository policy. |
What this PR does
What happens when I delete a BaseModel or ClusterBaseModel while nodes are still downloading it, or while its download is waiting in the agent's queue?
Why we need it
Source change: ome-projects/ome@c23c643
In pkg/modelagent/gopher_task_queue.go, enqueue inserts a Delete task at the front of the high-priority queue and removeSupersededTasks drops the model's queued downloads ('Delete preempts pending work for the same model'); pkg/modelagent/gopher_task_tracker.go beginDelete cancels the active download attempt's context. Commit c23c643 (#1157) switched the agent's OCI bulk download to the context-aware ociobjectstore.BulkDownloadContext so an OCI download actually stops ('stops standard downloads between files and can cancel multipart downloads in progress; active SDK calls may delay cancellation'), completing what #1151 (mid-download HF cleanup of partial files) and #1156/#985 (delete-download races, no Failed status from a canceled download — gopher.go 'Skipping Failed status for canceled model download') built. Current docs say nothing about this: concepts/models/base-models.md 'Delete a model' describes only the finalizer waiting for each node's agent to report its copy deleted, and guides/operate-ome/model-agent.md 'How downloads run' says queued models 'wait their turn' with no mention that a delete preempts the queue or stops a running download. A reader who deletes a mistakenly created large model cannot tell whether the node keeps downloading hundreds of gigabytes. This is one independent concern: the interaction of deletion with an active or queued download, distinct from the ordering of downloads among themselves.
Scope: model-storage / delete-cancels-inflight-download. Other concerns are deferred.
How to test
git diff --checkand website content/link tests, type checks, lint and production build.Checklist
git commit -s)pnpm lint && pnpm check && pnpm test && pnpm buildpasses (run by the publisher on an isolated copy)