You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by ni...@apache.org on 2026/04/24 09:37:28 UTC
(apisix) branch fix/batch-processor-shutdown-infinite-loop updated: fix: add success log in premature path, remove unreliable shutdown_error_log
This is an automated email from the ASF dual-hosted git repository.
nic-6443 pushed a commit to branch fix/batch-processor-shutdown-infinite-loop
in repository https://gitbox.apache.org/repos/asf/apisix.git
The following commit(s) were added to refs/heads/fix/batch-processor-shutdown-infinite-loop by this push:
new 999e15189 fix: add success log in premature path, remove unreliable shutdown_error_log
999e15189 is described below
commit 999e1518982247c881f61daefcd05bb5d3107053
Author: Nic <qi...@api7.ai>
AuthorDate: Fri Apr 24 17:37:20 2026 +0800
fix: add success log in premature path, remove unreliable shutdown_error_log
- Add 'successfully processed' debug log in premature success path so
plugins that assert this log line (e.g., elasticsearch-logger) pass
regardless of whether processing occurs during normal operation or
worker shutdown
- Remove shutdown_error_log assertion from TEST 13 as timer callbacks
during shutdown may not reliably appear in the captured error log
- Simplify test callback
---
apisix/utils/batch-processor.lua | 2 ++
t/utils/batch-processor.t | 4 ----
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/apisix/utils/batch-processor.lua b/apisix/utils/batch-processor.lua
index 077eba4dd..59884ec7a 100644
--- a/apisix/utils/batch-processor.lua
+++ b/apisix/utils/batch-processor.lua
@@ -91,6 +91,8 @@ function execute_func(premature, self, batch)
local ok, err, first_fail = self.func(batch.entries, self.batch_max_size)
if ok then
self.processed_entries = self.processed_entries + #batch.entries
+ core.log.debug("Batch Processor[", self.name,
+ "] successfully processed the entries")
else
if first_fail then
self.processed_entries = self.processed_entries + first_fail - 1
diff --git a/t/utils/batch-processor.t b/t/utils/batch-processor.t
index c4a7e6840..3a7bbadee 100644
--- a/t/utils/batch-processor.t
+++ b/t/utils/batch-processor.t
@@ -496,8 +496,6 @@ Batch Processor[log buffer] failed to process entries [1/2]: error after consumi
content_by_lua_block {
local Batch = require("apisix.utils.batch-processor")
local func_to_send = function(elements)
- ngx.log(ngx.WARN, "batch-processor shutdown flush: ",
- #elements, " entries")
return true
end
@@ -524,6 +522,4 @@ Batch Processor[log buffer] failed to process entries [1/2]: error after consumi
GET /t
--- response_body
done
---- shutdown_error_log
-batch-processor shutdown flush: 2 entries
--- wait: 0.5