membphis commented on a change in pull request #1520:
URL: https://github.com/apache/incubator-apisix/pull/1520#discussion_r417066898
##########
File path: apisix/utils/log-util.lua
##########
@@ -18,6 +18,22 @@ local core = require("apisix.core")
local _M = {}
+
+local function remove_stale_objects(premature, log_buffer, status)
+ if premature then
+ return
+ end
+
+ for key, batch in ipairs(log_buffer) do
+ if #batch.entry_buffer.entries == 0 and #batch.batch_to_process == 0
then
+ core.log.debug("removing batch processor stale object, route id:"
.. tostring(key))
+ log_buffer[key] = nil
Review comment:
Can we delete stale objects here?
https://github.com/apache/incubator-apisix/blob/master/apisix/plugins/kafka-logger.lua#L120
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]