[FEA] Invalidate gRPC chunked-download sessions when deleting a job
Open
@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.cppStartChunkedDownloadGetResultChunk- download-session lifecycle coordination
cpp/src/grpc/server/grpc_job_management.cppdelete_jobcleanup path
cpp/src/grpc/server/grpc_server_types.hpp- any required download-session metadata or lifecycle declarations
- gRPC integration tests covering
DeleteResultand chunked downloads
Required changes
- Associate each
ChunkedDownloadStateentry with its originatingjob_id. - During
delete_job, remove every matching download session while holdingchunked_downloads_mutex. - Coordinate
StartChunkedDownloadand deletion so that no session can be created after deletion completes, including concurrent requests. - Ensure subsequent
GetResultChunkcalls for an invalidateddownload_idreturn the existing unknown-download/not-found behavior. - 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_idcannot return any further result data after deletion. - Concurrent
StartChunkedDownloadandDeleteResultcannot leave a usable session for a deleted job. - Existing chunked-download behavior for non-deleted jobs remains unchanged.
Backlinks
- Pull request: https://github.com/NVIDIA/cuopt/pull/1604
- Review discussion: https://github.com/NVIDIA/cuopt/pull/1604#discussion_r3634569391
- Requested by: @tmckayus
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.