Files
milvus/configs
congqixiaandGitHub 80c72eb86b enhance: add $partial_update field to proxy access log for Upsert (#49348)
UpsertRequest carries `bool partial_update`, and task_upsert may
implicitly promote a request to partial_update=true when any field
carries a FieldPartialUpdateOp != REPLACE. Today the proxy access log
exposes neither — every Upsert line falls through to the generic `base`
formatter and operators triaging a partial-update incident cannot tell
from logs alone whether a given Upsert was full or partial.

Add `$partial_update` to the access-log formatter vocabulary alongside
the existing 27 metrics:

- info.go: register $partial_update in MetricFuncMap; add
PartialUpdate() string to the AccessInfo interface; add the
getPartialUpdate delegator.
- grpc_info.go / restful_info.go: implement PartialUpdate() — type-
assert *milvuspb.UpsertRequest and return fmt.Sprint of
GetPartialUpdate(); return NotAny ("n/a") for any other type.
- configs/milvus.yaml: add a dedicated `upsert` formatter bound to
methods: "Upsert" so the new field shows up out of the box without
polluting the shared `base` formatter.

Implicit promotion (task_upsert.go:1308-1309) is reflected for free:
UnaryAccessLogInterceptor writes the log after handler() returns, and
the *UpsertRequest pointer on GrpcAccessInfo is the same instance the
task mutates, so the type-asserted GetPartialUpdate() reads the promoted
value without any SetPartialUpdate(ctx, …) writeback.

Tests: TestPartialUpdate added to both GrpcAccessInfoSuite and
RestfulAccessInfoSuite (non-Upsert -> "n/a"; PartialUpdate=false ->
"false"; PartialUpdate=true -> "true"). Both suites stay green
end-to-end.

issue: #49347

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2026-04-26 02:15:48 +08:00
..
2022-05-10 20:05:53 +08:00
2024-05-22 13:21:39 +08:00
2021-11-16 15:41:11 +08:00