Skip to content

Commit

Permalink
cp should always support full sync protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
chronolaw committed Oct 16, 2024
1 parent 3e25a80 commit 6803958
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions kong/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -879,9 +879,10 @@ function Kong.init_worker()
kong.cache:invalidate_local(constants.ADMIN_GUI_KCONFIG_CACHE_KEY)
end

if process.type() == "privileged agent" and (is_data_plane(kong.configuration) and not kong.sync) then
-- Currently privileged agent is enabled only on data planes
if process.type() == "privileged agent" and not kong.sync then
if kong.clustering then
-- full sync cp/dp
-- dp will enable full sync protocol
kong.clustering:init_worker()
end
return
Expand Down Expand Up @@ -983,8 +984,8 @@ function Kong.init_worker()

if kong.clustering then

-- full sync cp/dp
if is_control_plane(kong.configuration) or not kong.sync then
-- cp should always support full sync protocol
if is_control_plane(kong.configuration) and not kong.sync then
kong.clustering:init_worker()
end

Expand Down

0 comments on commit 6803958

Please sign in to comment.