Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Bug] FE metric http_copy_into_query_err_total is registered under the upload error name

Open Beginner friendly
#68,505 2 comments 0 reactions 0 assignees View on GitHub

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:

https://github.com/apache/doris/blob/573c93c63b88fb68ac1d318dcd3e1672dd2361e6/fe/fe-core/src/main/java/org/apache/doris/metric/MetricRepo.java#L834-L842

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:

https://github.com/apache/doris/blob/573c93c63b88fb68ac1d318dcd3e1672dd2361e6/fe/fe-core/src/main/java/org/apache/doris/metric/DorisMetricRegistry.java#L42-L51

The query error counter is registered second, so it replaces the upload error counter. As a result:

  • doris_fe_http_copy_into_upload_err_total reports the query error count.
  • The upload error count is never exported. CopyIntoAction still increments HTTP_COUNTER_COPY_INFO_UPLOAD_ERR, but the registry no longer holds it.
  • doris_fe_http_copy_into_query_err_total does 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?
  1. Start an FE.
  2. Run curl http://<fe_host>:<http_port>/metrics | grep http_copy_into.
  3. doris_fe_http_copy_into_upload_err_total appears once and counts query errors. doris_fe_http_copy_into_query_err_total does not appear.
Anything Else?

No response

Are you willing to submit PR?
  • Yes I am willing to submit a PR!
Code of Conduct
Dominant language
Java
Stars
16k
Forks
4k
Avg merge
2d 39m
Merged PRs (30d)
605

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/doris

All issues in apache/doris

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.