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

Aperta
#951 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
go

Direzione di ricerca

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.

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

Descrizione

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.

Lingua principale
Go
Stelle
1.2k
Fork
207
Merge medio
1g 10h
PR unite (30g)
85

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

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

Tutte le issue di google/agentmesh

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.