p2plimits: a connection refused at its peer scope is counted and logged as a refused stream

Abierto
#951 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
Medio día
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
go

Línea de trabajo

Start in internal/p2plimits/streams.go at StreamRefusals.BlockPeer (around line 128), which increments the peer-scope stream refusal metric and logs the stream-reset line. Then check the go-libp2p v0.51.0 call sites: BlockPeer is reached from connectionScope.SetPeer (rcmgr.go:826), while stream refusals arrive as BlockStream (rcmgr.go:429, 587-591). Run TestStreamRefusalsLogOneProtocolOncePerInterval, which currently depends on BlockPeer. Done means a maintainer decides whether connection refusals belong under the stream metric, and the chosen option is implemented and tested.

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

Descripción

StreamRefusals.BlockPeer (internal/p2plimits/streams.go:128) increments *_streams_refused_total{scope="peer"} and logs "[Stream] Refused N stream(s) at the peer scope … the peer sees its stream reset". In go-libp2p v0.51.0, BlockPeer is called only from connectionScope.SetPeer (rcmgr.go:826), i.e. when a connection is refused at the peer scope; a stream refused at its peer scope arrives as BlockStream (rcmgr.go:429, 587-591). So connection refusals show up as stream refusals in the metric and the log.

Repro (unit test against main 074b5e57): calling the observer's BlockPeer once yields streams refused at the peer scope = 1 and the stream-reset log line.

Question before a fix: is counting peer-scope connection refusals under the stream metric intended (an existing test, TestStreamRefusalsLogOneProtocolOncePerInterval, asserts the "scope with no protocol" line via BlockPeer)? If not, the options are a [Conn] log line with no stream count, or a separate connection-refusal counter in node and router.

Lenguaje dominante
Go
Estrellas
1.2k
Forks
207
Merge medio
1 d 10 h
PR fusionados (30 d)
85

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

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 google/agentmesh

Todos los issues de google/agentmesh

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.