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


##########
src/traffic_server/traffic_server.cc:
##########
@@ -309,9 +309,13 @@ struct AutoStopCont : public Continuation {
       CacheShm::mark_clean_shutdown();
     }
 
-    // Wake preproc threads to drain remaining log buffers before exit.
-    for (int i = 0; i < Log::preproc_threads; i++) {
-      Log::preproc_notify[i].signal();
+    // Wake preproc threads to drain remaining log buffers before exit. The 
notify array is allocated only once the log
+    // threads are spawned, which has not happened yet this early in startup 
and never happens at all for the log-only
+    // tools, so a null array means there is no preproc thread in existence 
and nothing to wake.

Review Comment:
   The added comment references “log-only tools”, but AutoStopCont exists only 
in traffic_server.cc and isn’t used by traffic_logcat/traffic_logstats. 
Mentioning those tools here is likely to mislead readers about when this guard 
is needed; consider rewording to focus on the traffic_server early-startup / 
not-fully-enabled logging case.



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