Copilot commented on code in PR #13556:
URL: https://github.com/apache/trafficserver/pull/13556#discussion_r3909544353
##########
doc/admin-guide/plugins/lua.en.rst:
##########
@@ -137,6 +137,27 @@ Example::
ts.debug('ATS shutting down, cleaning up resources')
end
+Because ``__shutdown__`` commonly releases process global resources, no Lua
code
+runs in any of the plugin's Lua states while the ``__shutdown__`` functions are
+invoked: the plugin waits for every state to become idle first, and no Lua
+callback enters a state after that. If a state is still executing Lua after
five
+seconds, the ``__shutdown__`` functions are skipped rather than run
concurrently
+with it, and that is reported in the error log. Requests are held for as long
as a
+``__shutdown__`` function runs, so it should return promptly.
Review Comment:
The implementation deliberately retains every state mutex after the shutdown
callbacks return, so queued requests remain blocked until process exit—not only
while a `__shutdown__` function runs. Please document that lifetime accurately
so operators understand the terminal behavior.
--
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]