moonchen opened a new pull request, #13491:
URL: https://github.com/apache/trafficserver/pull/13491

   The deferred destruction of a replaced config runs on a network thread 
today. `ConfigProcessor::set()` schedules it with `schedule_in()`, which 
defaults to ET_CALL, so 60 seconds later an ET_NET thread runs the destructor 
inside the drain phase of its event loop and is blocked for as long as the 
config takes to release, which is bounded only by the size of the config.
   
   Move that work to ET_TASK. `ConfigProcessor::release()` is the only place a 
config is destroyed, but two callers reach it: the releaser at 60 seconds, 
which destroys the config whenever nothing else still holds a reference, and a 
transaction that outlived the releaser and drops the last reference itself. 
This schedules the releaser on ET_TASK and hands the destructor from the 
transaction path to ET_TASK as well, so neither can block a network thread.
   
   The 60 second wait is unchanged. Shortening it would narrow the window that 
makes the load-then-increment in `ConfigProcessor::get()` safe, so it should 
not be tuned just because the destructor moved.
   
   The `config` debug tag now reports the duration of each destruction and the 
thread that ran it.
   


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