spacewander commented on a change in pull request #4867:
URL: https://github.com/apache/apisix/pull/4867#discussion_r693588677
##########
File path: apisix/init.lua
##########
@@ -694,7 +694,7 @@ function _M.http_log_phase()
end
core.ctx.release_vars(api_ctx)
- if api_ctx.plugins and api_ctx.plugins ~= core.empty_tab then
+ if api_ctx.plugins and core.table.nkeys(api_ctx.plugins) > 0 then
Review comment:
Empty plugins also need to be released.
##########
File path: apisix/plugin.lua
##########
@@ -307,7 +307,7 @@ function _M.filter(conf, plugins, route_conf)
trace_plugins_info_for_debug(nil)
-- when 'plugins' is given, always return 'plugins' itself instead
-- of another one
- return plugins or core.empty_tab
+ return plugins or {}
Review comment:
```suggestion
return plugins or core.tablepool.fetch("plugins", 0, 0)
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]