Skip to content

Commit

Permalink
check latest_version == ngx_null in CP
Browse files Browse the repository at this point in the history
  • Loading branch information
chronolaw committed Oct 25, 2024
1 parent fa628c0 commit 7ec6e82
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kong/clustering/services/sync/rpc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@ function _M:init_cp(manager)
end

local latest_version, err = self.strategy:get_latest_version()
if latest_version == nil or latest_version == ngx_null then
if latest_version == nil then
return nil, err
end

-- is the node empty? If so, just do a full sync to bring it up to date faster
if default_namespace_version == 0 or
if default_namespace_version == 0 or latest_version == ngx_null or
latest_version - default_namespace_version > FULL_SYNC_THRESHOLD
then
-- we need to full sync because holes are found
Expand Down

0 comments on commit 7ec6e82

Please sign in to comment.