NVIDIA / NVIDIA/cuopt

[FEA] Invalidate gRPC chunked-download sessions when deleting a job

Open
#1,612 2 comments 0 reactions 1 assignee View on GitHub

@tmckayus is already working on this.

Since Jul 23, 2026.

awaiting response
Dominant language
Cuda
Stars
1k
Forks
233
Avg merge
4d 4h
Merged PRs (30d)
95

Description

Summary

DeleteResult should invalidate all active chunked-result download sessions associated with the deleted job.

Rationale

StartChunkedDownload snapshots completed result arrays into chunked_downloads. Deleting the job currently removes the tracker entry, pending data, and log file, but a client that already holds a download_id can continue retrieving the snapshotted result. This leaves deleted job data accessible and resident until the download session is finished or expires.

Affected areas

  • cpp/src/grpc/server/grpc_service_impl.cpp
    • StartChunkedDownload
    • GetResultChunk
    • download-session lifecycle coordination
  • cpp/src/grpc/server/grpc_job_management.cpp
    • delete_job cleanup path
  • cpp/src/grpc/server/grpc_server_types.hpp
    • any required download-session metadata or lifecycle declarations
  • gRPC integration tests covering DeleteResult and chunked downloads

Required changes

  1. Associate each ChunkedDownloadState entry with its originating job_id.
  2. During delete_job, remove every matching download session while holding chunked_downloads_mutex.
  3. Coordinate StartChunkedDownload and deletion so that no session can be created after deletion completes, including concurrent requests.
  4. Ensure subsequent GetResultChunk calls for an invalidated download_id return the existing unknown-download/not-found behavior.
  5. Add integration coverage for deleting a job with an active chunked download and for the creation/deletion race.

Acceptance criteria

  • After a successful DeleteResult, no active chunked-download session remains for that job.
  • A previously issued download_id cannot return any further result data after deletion.
  • Concurrent StartChunkedDownload and DeleteResult cannot leave a usable session for a deleted job.
  • Existing chunked-download behavior for non-deleted jobs remains unchanged.

Backlinks

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.