Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta Adatta ai principianti
#68,505 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
1/5
Tempo stimato
Meno di un'ora
Idoneità per principianti
85/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
java
Ambito
observability

Direzione di ricerca

Il bug si trova in fe/fe-core/src/main/java/org/apache/doris/metric/MetricRepo.java, righe 834-842. Il nome della metrica per HTTP_COUNTER_COPY_INFO_QUERY_ERR dovrebbe essere 'http_copy_into_query_err_total'. Modificare la stringa, quindi avviare il FE ed eseguire il comando curl dell'issue per verificare che la nuova metrica appaia e che il contatore degli errori di upload sia separato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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
Lingua principale
Java
Stelle
16k
Fork
4k
Merge medio
2g 39m
PR unite (30g)
605

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/doris

Tutte le issue di apache/doris

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.