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(sync): full sync not working if dedicated disabled #13857

Merged
merged 4 commits into from
Nov 13, 2024
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
26 changes: 15 additions & 11 deletions kong/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -881,19 +881,23 @@ function Kong.init_worker()
end

if kong.clustering then
-- full sync dp

local is_dp_full_sync_agent = process.type() == "privileged agent" and not kong.sync

if is_control_plane(kong.configuration) or -- CP needs to support both full and incremental sync
is_dp_full_sync_agent -- full sync is only enabled for DP if incremental sync is disabled
then
if is_control_plane(kong.configuration) then-- CP needs to support both full and incremental sync
kong.clustering:init_worker()
end

-- full sync is only enabled for DP if incremental sync is disabled
elseif is_data_plane(kong.configuration) and not kong.sync then
local using_dedicated = kong.configuration.dedicated_config_processing
if using_dedicated and process.type() == "privileged agent" then
-- full sync dp agent
kong.clustering:init_worker()
return

-- DP full sync agent skips the rest of the init_worker
if is_dp_full_sync_agent then
return
end
StarlightIbuki marked this conversation as resolved.
Show resolved Hide resolved

if not using_dedicated then
-- full sync dp
kong.clustering:init_worker()
end
end
end

Expand Down
Loading