hanahmily opened a new pull request, #1166:
URL: https://github.com/apache/skywalking-banyandb/pull/1166
### What
The non-batched publish path (`pub.publish`, used by `Publish`/`Broadcast`
for `query` and `control` topics) previously emitted **no**
`banyandb_queue_pub_*` metrics — it only stamped sender identity onto the first
frame so the *receiver* could record them on `banyandb_queue_sub_*`. As a
result the liaison→data **query** fan-out was invisible on the publisher side,
and a topology built from `queue_pub` alone showed liaison→hot/liaison only (no
warm/cold query edges).
This instruments that path so it records the same `banyandb_queue_pub_*`
family as the batch-write path:
- `total_started` on a successful send (in `pub.publish`).
- `total_finished` + `total_latency` when the response is read in
`future.Get`.
- `total_err` split by reason: `send_error` (stream open / first frame),
`recv_error`, `server_rejected`, `decode_error`, `invalid_topic`.
The `future` now carries the per-stream metric context (operation / group /
node / role / tier / start time). All emissions are **nil-guarded** on
`p.metrics`, so the metadata-less migration publisher (`NewWithoutMetadata`)
stays silent. `sent_bytes` remains file-sync only (unchanged), matching the
existing batch-write semantics.
### Why
`operation="query"` / `operation="control"` are now first-class publisher
edges, with `remote_tier` populated, so the liaison→warm/cold query fan-out is
observable directly from `queue_pub` — no receiver-side join or direction
inversion required.
### Verification
- `go build ./...`, `go test ./banyand/queue/pub/...` pass.
- `make -C banyand lint` clean (golangci-lint + revive); `make check`
(license/format/tidy) consistent.
- Deployed to a live cluster's liaisons:
`banyandb_queue_pub_total_*{operation="query"}` now appears with `remote_tier`
hot/warm, alongside `operation="control"`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]