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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]