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

オープン
#951 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
半日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
go

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Go
スター
1.2k
フォーク
207
平均マージ
1日 10時間
マージ済み PR(30日)
85

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

google/agentmesh のほかの issue

google/agentmesh の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。