[Bug] FE metric http_copy_into_query_err_total is registered under the upload error name
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 85/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- java
- Domain
- observability
Research direction
The bug is in fe/fe-core/src/main/java/org/apache/doris/metric/MetricRepo.java lines 834-842. The metric name for HTTP_COUNTER_COPY_INFO_QUERY_ERR should be 'http_copy_into_query_err_total'. Change the string, then start the FE and run the curl command from the issue to verify the new metric appears and the upload error counter is separate.
Written by the indexing model from the issue text.
Description
Search before asking
- I had searched in the issues and found no similar issues.
Version
master (573c93c63b88fb68ac1d318dcd3e1672dd2361e6)
What's Wrong?
In MetricRepo, the counter HTTP_COUNTER_COPY_INFO_QUERY_ERR is registered with the name of the upload error counter:
HTTP_COUNTER_COPY_INFO_UPLOAD_ERR = new LongCounterMetric("http_copy_into_upload_err_total",
MetricUnit.REQUESTS, "http copy into upload err request");
...
HTTP_COUNTER_COPY_INFO_QUERY_ERR = new LongCounterMetric("http_copy_into_upload_err_total",
MetricUnit.REQUESTS, "http copy into err query request");
DorisMetricRegistry keys metrics by name and labels, and MetricList.addMetrics replaces an existing entry with the same key:
The query error counter is registered second, so it replaces the upload error counter. As a result:
doris_fe_http_copy_into_upload_err_totalreports the query error count.- The upload error count is never exported.
CopyIntoActionstill incrementsHTTP_COUNTER_COPY_INFO_UPLOAD_ERR, but the registry no longer holds it. doris_fe_http_copy_into_query_err_totaldoes not exist.
CopyIntoAction increments HTTP_COUNTER_COPY_INFO_QUERY_ERR only on the query path, so the counter is correct but its name is wrong.
What You Expected?
The query error counter is exported as doris_fe_http_copy_into_query_err_total, which matches the naming of the other three copy-into counters (http_copy_into_upload_request_total, http_copy_into_upload_err_total, http_copy_into_query_request_total).
How to Reproduce?
- Start an FE.
- Run
curl http://<fe_host>:<http_port>/metrics | grep http_copy_into. doris_fe_http_copy_into_upload_err_totalappears once and counts query errors.doris_fe_http_copy_into_query_err_totaldoes not appear.
Anything Else?
No response
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
- Dominant language
- Java
- Stars
- 16k
- Forks
- 4k
- Avg merge
- 2d 39m
- Merged PRs (30d)
- 605
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.
More from apache/doris
-
Difficulty 1/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Similar issues
-
area-deployment area-integrations triage:bot-seen
Difficulty 2/5 Half a day Newbie friendliness 86/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
apache/flink-agents#1156 ·
-
[source-shopify] FAILED bulk operation without partialDataUrl is silently treated as successful Openarea/connectors autoteam community connectors/source/shopify needs-triage team/use type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
infinispan/infinispan#18199 ·