Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

[Bug] QoS count command ignores the times argument after cd

Abierto Apto para principiantes
#16,530 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@CCCLL ya está trabajando en esto.

Desde el 20/10/2026.

  • #16531 de @CCCLL — abierto

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
82/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
java
Área
cli

Línea de trabajo

Lee CountTelnet#execute y el uso de sus comandos en la implementación QoS de CountTelnet; el issue identifica el análisis de argumentos que selecciona times. Compara los argumentos después de cd con los que se reciben cuando se proporciona el nombre del servicio y, luego de cd repro.Echo, ejecuta o agrega cobertura para count length 3. La tarea estará lista cuando imprima la tabla de estadísticas tres veces, igual que el comando sin cd.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Apache Dubbo Component

Java SDK (apache/dubbo)

Dubbo Version

3.3 branch (cb05763298), OpenJDK 21, macOS. The argument parsing goes back to CountTelnetHandler in 2.0.7 and was carried over to the QoS CountTelnet in #8175.

Steps to reproduce this issue
  1. Start a provider with QoS enabled and a dubbo service (here repro.Echo with a method length).
  2. Connect to the QoS port and run cd repro.Echo, then count length 3.

The statistics table is printed once. Without cd, count repro.Echo length 3 prints it three times, one second apart.

CountTelnet#execute reads the times like this:

if (service == null || service.length() == 0) {
    service = args[0];
    method = args.length > 1 ? args[1] : null;
} else {
    method = args.length > 0 ? args[0] : null;
}
if (StringUtils.isNumber(method)) {
    times = method;
    method = null;
} else {
    times = args.length > 2 ? args[2] : "1";
}

After cd, the arguments are [method, times], so args[2] does not exist and times falls back to "1". (count length 3 5 after cd runs five times.)

What you expected to happen

count length 3 after cd repro.Echo prints the table three times, like count repro.Echo length 3. The usage message of the command also describes cd XxxService as an alternative to giving the service name (count XxxService xxxMethod 10 ... or "cd XxxService" firstly).

Anything else

count 3 after cd (no method) already works, because a numeric first argument is taken as the times.

Are you willing to submit a pull request to fix on your own?
  • Yes I am willing to submit a pull request on my own!
Lenguaje dominante
Java
Estrellas
41.6k
Forks
26.3k
Merge medio
8 h 6 min
PR fusionados (30 d)
8

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de apache/dubbo

Todos los issues de apache/dubbo

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.