Doris-Breakwater commented on issue #68505: URL: https://github.com/apache/doris/issues/68505#issuecomment-5819428113
Confirmed as a valid FE metrics bug at `573c93c63b88fb68ac1d318dcd3e1672dd2361e6`. The issue is currently open, unassigned, and has no labels or linked PR. **Verified facts** - `HTTP_COUNTER_COPY_INFO_QUERY_ERR` is constructed with `http_copy_into_upload_err_total`; the expected name is `http_copy_into_query_err_total`. - `CopyIntoAction` increments the upload-error and query-error counter objects on their respective paths, so the call sites are already separated correctly. - There is one important correction to the reported impact: `DorisMetricRegistry` indexes metrics first by name and then by the computed label set ([registration](https://github.com/apache/doris/blob/573c93c63b88fb68ac1d318dcd3e1672dd2361e6/fe/fe-core/src/main/java/org/apache/doris/metric/DorisMetricRegistry.java#L42-L50), [storage](https://github.com/apache/doris/blob/573c93c63b88fb68ac1d318dcd3e1672dd2361e6/fe/fe-core/src/main/java/org/apache/doris/metric/DorisMetricRegistry.java#L146-L151)). Both counters have no labels, and the query counter is registered second, so it replaces the upload counter in the registry. On this revision, `/metrics` should therefore expose one `doris_fe_http_copy_into_upload_err_total` sample backed by the query-error counter, not two duplicate samples. Upload-error increments occur on an object that is no longer exported, and `doris_fe_http_copy_into_query_err_total` is absent. **Missing information** No further information is required to confirm or fix the source-level defect. If the endpoint actually emits two identical samples, please attach the exact `/metrics` lines and confirm the running commit, because that would contradict the registry behavior above and indicate another export path or a different build. **Recommended next steps** 1. Change only the query counter's metric name to `http_copy_into_query_err_total`. 2. Add a focused FE unit test (for example in `MetricsTest`) asserting that the upload and query error names each resolve to their intended counter object and that Prometheus output contains each series exactly once. This will also catch future name/label collisions that silently replace a metric. 3. Verify after initialization that incrementing each counter changes only its corresponding exported series. No production profile or broader runtime logs are needed for this fix. This is an observability correctness issue; it does not appear to affect COPY INTO request execution itself. The reporter has offered to submit a PR, and the proposed one-line rename plus regression test is the appropriate scope. Breakwater-GitHub-Analysis-Slot: slot_fd89ae7b68df -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
