Repository navigation
Description
Is there an existing issue for this?
- I have searched the existing issues
Is your feature request related to a problem? Please describe.
Operators have no way to see which Search / HybridSearch / Query requests are currently executing in a cluster, nor to stop one of them. When a heavy request occupies a QueryNode, the only options today are to wait for the client's own timeout (if the client set one) or to restart components.
Milvus already has an end-to-end cancellation path driven by the client's gRPC deadline: proxy task ctx → QueryNode scheduler → cgo future → segcore checkCancellation → knowhere / cardinal per-query checks. What is missing is a server-side way to trigger that path for a specific request, plus a way to list the in-flight requests it could be triggered on.
Describe the solution you'd like.
Two cluster-scoped RPCs:
ListRunningRequests: returns the requests currently registered on every proxy (request id, proxy id, type, db, collection, user, client address, nq, topk, expression prefix, start time, queued time, elapsed time, state, task ids, trace id, cancellable), with optional db / collection / user / minimum elapsed filters.CancelRequests: cancels the given request ids. Cancelling a request cancels its root context, so every proxy sub-task and every QueryNode sub-request of that RPC stop together. The client receives a dedicated non-retriable error code (ErrRequestCancelled).
Supporting changes: a per-proxy request registry keyed by a request id from the proxy's ID allocator; proxy → MixCoord → all-proxy fan-out reusing the ClearReadTaskQueue path; two new global privileges; the proxy load balancer must stop blacklisting a QueryNode when the request's own ctx is already cancelled; a counter and an audit log line per cancellation.
No server-side automatic cancellation (no max execution time, no admission-time rejection): request lifetime stays under the client's timeout.
Describe an alternate solution.
Rely solely on client-side timeouts. This does not cover clients that set no timeout and gives operators no visibility or manual control.
Anything else? (Additional Context)
Design document PR to follow. Related existing defect: #53508 (cancellation of one request fails every request merged into the same QueryNode search group), which must be fixed independently for cancellation to be isolated per request.
Activity
feat: register in-flight DQL requests on the proxy so they can be lis…
feat: add ListRunningRequests and CancelRequests
feat: add ListRunningRequests and CancelRequests (#670)
doc: add design doc for listing and cancelling running DQL requests (#…
fix: let a cancelled brute-force search stop before the scan ends
enhance: treat a cancelled request's errors as cancellation, not node…
feat: register in-flight DQL requests on the proxy so they can be lis…
feat: add ListRunningRequests and CancelRequests
feat: add ListRunningRequests and CancelRequests
enhance: treat a cancelled request's errors as cancellation, not node…
feat: register in-flight DQL requests on the proxy so they can be lis…
feat: add ListRunningRequests and CancelRequests
feat: add ListRunningRequests and CancelRequests
enhance: treat a cancelled request's errors as cancellation, not node…
36 remaining items
feat: register in-flight DQL requests on the proxy so they can be lis…
feat: add ListRunningRequests and CancelRequests
test: cover an operator cancel while a DQL request waits for auto-load
czs007 commentedon Nov 6, 2026
Local rerun of the full end-to-end campaign (the 2026-10-22 steps plus the 2026-10-23 additions) after #54276 was rebased onto master 105fa7a, which includes #52977 (QueryView). Build under test: #54276 at 954be1e; pymilvus#3884 at c8d38e73. Baseline for the upgrade steps: master 105fa7a without the PR.
Result: every applicable step passed. 5 steps are not applicable on the QueryView path (merged-group, client disconnect x4). No regression found.
Setup
qvplain(authorization off),qvauth(authorization on,PROXY_MAXTASKNUM=5),qvgrp(QueryNode grouping forced),qvold(built from the baseline, for the reverse upgrade).internal/views/queryclient) on the proxy andinternal/querynodev2/viewqueryon the QueryNode.cancel_e2e, 100,000 rows x 768 dims, FLAT and HNSW.Steps
milvus_proxy_request_canceled_total+1not_found, empty list rejected (1101), real cancelJSON.parse,cause="cancel"request metricsCancelingobserved between cancel and departure (best effort)read_task_ready_len0node_results, unknown id stillnot_found, client gets 3002Not applicable. On the QueryView path the QueryNode runs
tasks.NewSearchTask(...).ExecuteOnSegmentsdirectly fromviewquery, without the read-task scheduler, so no merged groups form (the probe saw groups of 0 tasks). The canceled client in that probe still got 3002.QueryNode stop, how it was measured. On 10-22 the number came from
milvus_querynode_read_task_execute_duration{outcome="cancel"}(task start to stop). The QueryView path does not write that metric, so this run measures from the proxy audit line (request canceled by operator) to the last segcoreBrute force search fail: cancelled by the callerline, i.e. cancel to stop. The two numbers measure different intervals.60-minute soak
canceled_totalmoved byCI
#54276 at 954be1e: build-ut-cov (UT-C++ 23004/23004, Go diff coverage 74.8%), e2e-default and go-sdk all pass;
ci-passed.feat: list running DQL requests and cancel them by id (#54276)
feat: add ListRunningRequests and CancelRequests to the Go SDK
feat: add ListRunningRequests and CancelRequests to the Go SDK
feat: add listRunningRequests and cancelRequests to MilvusClientV2 (#…
feat: add listRunningRequests and cancelRequests to MilvusClientV2 (#…
feat: add ListRunningRequests and CancelRequests to the Go SDK
feat: add ListRunningRequests and CancelRequests to the Go SDK (#55250)
doc: update the running-request design for string request ids (#55209)
fix: return camelCase keys and complete rows from the running-request…
fix: make an operator cancel and the request's answer agree
fix: make an operator cancel and the request's answer agree (#55607)