nic-6443 commented on code in PR #12338:
URL: https://github.com/apache/apisix/pull/12338#discussion_r2155834372


##########
apisix/utils/batch-processor-manager.lua:
##########
@@ -29,6 +29,7 @@ function _M.new(name)
     return setmetatable({
         stale_timer_running = false,
         buffers = {},
+        total_pushed_entries = 0,

Review Comment:
   If you record this number through a member of this module, it means that all 
places where the module is loaded via require 
   ```
   local batch_processor = require("apisix.utils.batch-processor")
   ```
   share the same counter. Shouldn't there be an independent counter for each 
plugin configuration since `max_pending_entries` can be configured at the 
specific plugin level? I think we should add this counter to every 
`batch_processor ` instance. 
https://github.com/apache/apisix/blob/cba5ba93d49886972228c0db44fb49746d4ec156/apisix/utils/batch-processor.lua#L148-L176



-- 
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-unsubscr...@apisix.apache.org

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

Reply via email to