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


##########
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:
   Good catch, you are right. AutoStopCont is defined in traffic_server.cc and 
no other target links it, so traffic_logcat and traffic_logstats never reach 
this loop. Reworded to cite command mode instead, which does apply: cmd_verify 
calls Log::init and never Log::load_config, so the array stays null for the 
life of that process.
   
   _🤖 Addressed by [Claude Code](https://claude.com/claude-code)_



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