moonchen commented on code in PR #13737:
URL: https://github.com/apache/trafficserver/pull/13737#discussion_r4125451498
##########
src/iocore/net/UnixNetAccept.cc:
##########
@@ -138,7 +148,12 @@ net_accept(NetAccept *na, void *ep, bool blockable)
vc->enable_inbound_connection_tracking(std::move(conn_track_group));
count++;
- Metrics::Gauge::increment(net_rsb.connections_currently_open);
+ vc->set_throttle_exempt(is_throttle_exempt(con));
+ if (vc->is_throttle_exempt()) {
+ Metrics::Counter::increment(net_rsb.connections_throttle_exempt_in);
+ } else {
+ Metrics::Gauge::increment(net_rsb.connections_currently_open);
Review Comment:
`net_accept()` isn't the `accept_threads=0` path. With `accept_threads` 0,
proxy ports use `init_accept_per_thread()` → `acceptFastEvent()`, which checks
the throttle; the test's `accept_threads 0` runs see IPv4 connections refused
at the limit. `net_accept()` runs only for ports a plugin opens with
`TSNetAccept()`, which master doesn't throttle today. This PR is about
excluding connections from the throttle, not about extending the throttle to
accept paths it doesn't cover, so I've left that path as it is apart from not
counting exempt connections.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]