traffic_server ignores -n / --net_threads / PROXY_NET_THREADS

オープン 初心者向け
#14,200 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
cpp
領域
networking

調査の方向性

src/traffic_server/traffic_server.cc の process_args と main 内の代入を読み、その後 doc/appendices/command-line/traffic_server.en.rst にある -n と --net_threads の説明を確認してください。明示的に指定されたスレッド数が引数解析後も保持され、自動設定の経路で adjust_num_of_net_threads に渡されることを検証してください。オプションと PROXY_NET_THREADS がドキュメントどおりに動作するか、廃止する意図であればドキュメントとともに削除されれば完了です。

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

説明

Bug Configuration Core Regression Startup

traffic_server still accepts -n COUNT / --net_threads COUNT and the PROXY_NET_THREADS environment variable (https://github.com/apache/trafficserver/blob/eeeada36e1dff81822977bc36016d4264d64cdb8/src/traffic_server/traffic_server.cc#L227, documented in https://github.com/apache/trafficserver/blob/eeeada36e1dff81822977bc36016d4264d64cdb8/doc/appendices/command-line/traffic_server.en.rst#L120). process_args stores the value in num_of_net_threads (https://github.com/apache/trafficserver/blob/eeeada36e1dff81822977bc36016d4264d64cdb8/src/traffic_server/traffic_server.cc#L2033), but main later overwrites it unconditionally with the processor count before passing it to adjust_num_of_net_threads (https://github.com/apache/trafficserver/blob/eeeada36e1dff81822977bc36016d4264d64cdb8/src/traffic_server/traffic_server.cc#L2290-L2292).

Before #12023 ("Verbose debugging for setting the number of net threads"), num_of_net_threads was initialized to ink_number_of_processors() at its definition, so the option overrode it, and with proxy.config.exec_thread.autoconfig.enabled: 1 (the default) adjust_num_of_net_threads scaled the given value. #12023 moved the processor-count assignment to after argument parsing, so the option has had no effect since. This looks unintended for a debug-logging change.

With autoconfig disabled, proxy.config.exec_thread.limit decides the count either way, so only the autoconfig path is affected.

Suggested fix: assign ink_number_of_processors() only when the option was not given (for example, keep the 0 default and treat 0 as "not set"), or remove the option and its documentation if it's meant to be gone.


generated with Claude Opus 5.5 by Josiah VanderZee

主要言語
C++
スター
2k
フォーク
903
平均マージ
4日 4時間
マージ済み PR(30日)
135

環境構築

はじめの一歩

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

apache/trafficserver のほかの issue

apache/trafficserver の issue をすべて見る

似ている issue

C++ の issue をもっと見る

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

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