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 2022/03/04 07:31:14 UTC

[GitHub] [apisix] spacewander commented on a change in pull request #6502: feat: rerun rewrite phase for newly added plugins in consumer

spacewander commented on a change in pull request #6502:
URL: https://github.com/apache/apisix/pull/6502#discussion_r819327079



##########
File path: apisix/init.lua
##########
@@ -454,8 +454,15 @@ function _M.http_access_phase()
 
             if changed then
                 api_ctx.matched_route = route
+                local runned_plugins = core.table.deepcopy(api_ctx.plugins)
                 core.table.clear(api_ctx.plugins)
-                api_ctx.plugins = plugin.filter(api_ctx, route, api_ctx.plugins)
+                local unrunn_plugins

Review comment:
       Maybe we can add a flag in https://github.com/apache/apisix/blob/c4229d15efe8cac6677f8124cf92d3512d1b0180/apisix/plugin.lua#L505 so that we can save allocation?




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

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