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 09:04:38 UTC

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

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



##########
File path: apisix/init.lua
##########
@@ -456,6 +456,8 @@ function _M.http_access_phase()
                 api_ctx.matched_route = route
                 core.table.clear(api_ctx.plugins)
                 api_ctx.plugins = plugin.filter(api_ctx, route, api_ctx.plugins)
+                -- rerun rewrite phase for newly added plugins in consumer
+                plugin.rerun_plugins_of_consumer(api_ctx.plugins, api_ctx)

Review comment:
       Currently, plugins in APISIX can only be run once, but after introducing this method, some plugins (in rewrite phase) can be run twice.
   
   This inconsistence will confuse the users. I think either we only allow running each plugin for just one time or we need to redesign the plugin system so that plugins can be run multiple times.




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