You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2023/01/06 06:16:02 UTC

[GitHub] [apisix] alptugay commented on a diff in pull request #8620: fix: Compression in log-rotate plugin exceeds the default timeout of shell.run

alptugay commented on code in PR #8620:
URL: https://github.com/apache/apisix/pull/8620#discussion_r1063153128


##########
apisix/plugins/log-rotate.lua:
##########
@@ -277,6 +277,7 @@ local function rotate()
         max_size = attr.max_size or max_size
         enable_compression = attr.enable_compression or enable_compression
     end
+    local timeout = interval * 100 -- Timeout for compression is interval in milliseconds

Review Comment:
   I don't agree that timeout should be a user defined parameter. Because, setting a timeout greater than interval may cause undefined behaviour (eg. second rotation starts but first compression is still running), and setting the value too low also causes the mentioned undesired behaviour (so doesn't fix the issue in the first place). So, this value should be automatically set based on interval and shoud not be user defined imho.



-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org