monkeyDluffy6017 commented on code in PR #7826:
URL: https://github.com/apache/apisix/pull/7826#discussion_r959646639


##########
apisix/plugins/log-rotate.lua:
##########
@@ -169,6 +171,32 @@ local function rename_file(log, date_str)
 end
 
 
+local function wait_old_nginx_exit()
+    local found = true
+    local max_try = 10  -- 10 seconds
+    local prefix = ngx.config.prefix()
+    local file_path = prefix .. "/logs/nginx.pid.oldbin"

Review Comment:
   where or why?
   1. where 
   Before executing the new Nginx binary.
   
https://github.com/nginx/nginx/blob/f7ea8c76b55f730daa3b63f5511feb564b44d901/src/core/nginx.c#L717
   2. why
   It's for rollback, if the new Nginx binary doesn't work, we could kill the 
new one, and use the old Nginx instead.



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