Copilot commented on code in PR #13737:
URL: https://github.com/apache/trafficserver/pull/13737#discussion_r4116632234


##########
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:
   This ET_NET accept path (`net_accept`, used when 
`proxy.config.accept_threads` is 0) never calls `check_net_accept_throttle()` 
before installing the VC. Consequently `connections_currently_open` can exceed 
`connections_throttle`, and non-exempt clients continue to be accepted; the new 
test's `accept_threads=0` cases will not exercise the documented limit. Apply 
the same throttle check and `connections_throttled_in` handling used by the 
blocking and fast accept paths before accepting this connection.



-- 
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]

Reply via email to