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:23:22 UTC

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

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



##########
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:
       bad style: avoid to concat string object
   
   `core.log.debug("remove **", "****", "****")`




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