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(clustering/rpc): cascade deleting for incremental sync #13836

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

chronolaw
Copy link
Contributor

Summary

KAG-5755

Checklist

  • The Pull Request has tests
  • A changelog file has been created under changelog/unreleased/kong or skip-changelog label added on PR if changelog is unnecessary. README.md
  • There is a user-facing docs PR against https://github.com/Kong/docs.konghq.com - PUT DOCS PR HERE

Issue reference

Fix #[issue number]

@github-actions github-actions bot added core/clustering cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee labels Nov 6, 2024
@chronolaw chronolaw marked this pull request as ready for review November 6, 2024 01:35
@chronolaw chronolaw marked this pull request as draft November 6, 2024 02:35
@chronolaw chronolaw marked this pull request as ready for review November 6, 2024 02:58
@chronolaw chronolaw changed the title fix(clustering/rpc): cascade deleting for inc sync fix(clustering/rpc): cascade deleting for incremental sync Nov 6, 2024
kong/clustering/services/sync/hooks.lua Outdated Show resolved Hide resolved
@@ -161,8 +166,38 @@ function _M:register_dao_hooks()

ngx_log(ngx_DEBUG, "[kong.sync.v2] new delta due to deleting ", name)

-- set lmdb value to ngx_null then return row
return self:entity_delta_writer(entity, name, options, ws_id, true)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that we lost this logic in the new patch? Is it intended?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, entity_delta_writer() only process one entity, but in deletion we may have many entities, but the basic logic is same, please compare to entity_delta_writer().

kong/clustering/services/sync/rpc.lua Outdated Show resolved Hide resolved
kong/clustering/services/sync/rpc.lua Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee core/clustering size/M skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants