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 2020/05/06 06:54:27 UTC

[GitHub] [incubator-apisix] sshniro commented on a change in pull request #1543: Removing stale objects from tcp logger

sshniro commented on a change in pull request #1543:
URL: https://github.com/apache/incubator-apisix/pull/1543#discussion_r420578898



##########
File path: apisix/plugins/tcp-logger.lua
##########
@@ -95,6 +98,23 @@ local function send_tcp_data(conf, log_message)
 end
 
 
+local function remove_stale_objects(premature)
+    if premature then
+        return
+    end
+
+    for key, batch in ipairs(buffers) do
+        if #batch.entry_buffer.entries == 0 and #batch.batch_to_process == 0 then
+            core.log.debug("removing batch processor stale object,"  ..

Review comment:
       Thank you, fixed for the udp, kafka as well.

##########
File path: apisix/plugins/tcp-logger.lua
##########
@@ -95,6 +98,23 @@ local function send_tcp_data(conf, log_message)
 end
 
 
+local function remove_stale_objects(premature)
+    if premature then
+        return
+    end
+
+    for key, batch in ipairs(buffers) do
+        if #batch.entry_buffer.entries == 0 and #batch.batch_to_process == 0 then
+            core.log.debug("removing batch processor stale object,"  ..

Review comment:
       Thank you, fixed for the udp, kafka PR as well.




----------------------------------------------------------------
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:
users@infra.apache.org