Skip to content

Commit

Permalink
fix(sync): full sync not working if dedicated disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
StarlightIbuki committed Nov 11, 2024
1 parent a1a6f63 commit 4c92d83
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions kong/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -881,14 +881,20 @@ 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()

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

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

-- DP full sync agent skips the rest of the init_worker
Expand Down

0 comments on commit 4c92d83

Please sign in to comment.