Skip to content

Commit

Permalink
fix(runloop): skip router rebuilding if reconfigure is running
Browse files Browse the repository at this point in the history
  • Loading branch information
ADD-SP committed Jan 3, 2025
1 parent 33523c9 commit fcb7a5f
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion kong/runloop/handler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -992,8 +992,30 @@ return {
if strategy ~= "off" or kong.sync then
local worker_state_update_frequency = kong.configuration.worker_state_update_frequency or 1

--[[
+-----------+
| Start | <-------------------------------------+
+-----------+ |
| |
| |
v |
*************************** +-------+ |
* Is reconfigure running? * ---Yes--->| Sleep | ----+
*************************** +-------+
| ^
No |
| |
v |
+---------------+ |
| rebuild router|-------------------------+
+---------------+
Since reconfigure will also rebuild the router, we skip this round
of rebuilding the router.
--]]
local router_async_opts = {
name = "router",
name = RECONFIGURE_OPTS and RECONFIGURE_OPTS.name or "router", -- please check the above diagram for the
-- reason of using the same name as reconfigure
timeout = 0,
on_timeout = "return_true",
}
Expand Down

0 comments on commit fcb7a5f

Please sign in to comment.