traffic_server ignores -n / --net_threads / PROXY_NET_THREADS

Đang mở Phù hợp với người mới
#14,200 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
78/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
cpp
Lĩnh vực
networking

Hướng nghiên cứu

Đọc process_args và phép gán trong main ở src/traffic_server/traffic_server.cc, sau đó kiểm tra tài liệu về -n và --net_threads trong doc/appendices/command-line/traffic_server.en.rst. Xác minh rằng số luồng được cung cấp rõ ràng vẫn được giữ nguyên sau khi phân tích đối số và được truyền tới adjust_num_of_net_threads trên đường đi tự động cấu hình; công việc hoàn tất khi tùy chọn và PROXY_NET_THREADS hoạt động như tài liệu mô tả, hoặc được xóa cùng tài liệu nếu dự định ngừng sử dụng chúng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
C++
Star
2k
Fork
903
Merge trung bình
4 ngày 4 giờ
Pull request đã merge (30 ngày)
135

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của apache/trafficserver

Tất cả issue của apache/trafficserver

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.