Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(runloop): skip router rebuilding if reconfigure is running #14056

Merged
merged 1 commit into from
Jan 14, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading