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

refactor(clustering/rpc): code clean of full sync in rpc #13823

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

Conversation

chronolaw
Copy link
Contributor

@chronolaw chronolaw commented Nov 3, 2024

Summary

KAG-5728

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 3, 2024
@chronolaw chronolaw changed the title refactor(clustering/rpc): code clean for full sync in rpc refactor(clustering/rpc): code clean of full sync in rpc Nov 3, 2024
@chronolaw chronolaw marked this pull request as ready for review November 3, 2024 23:23
@team-gateway-bot team-gateway-bot added the author/community PRs from the open-source community (not Kong Inc) label Nov 3, 2024
@team-eng-enablement team-eng-enablement removed the author/community PRs from the open-source community (not Kong Inc) label Nov 4, 2024
Copy link
Contributor

@StarlightIbuki StarlightIbuki left a comment

Choose a reason for hiding this comment

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

To me, making the function not nested is good enough

end

-- wipe dp lmdb, full sync
return { default = { deltas = deltas, wipe = true, }, }
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
return { default = { deltas = deltas, wipe = true, }, }
return gen_delta_result(deltas, true)

Otherwise remove the function above

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Talked offline, it is not a blocker.

local function gen_delta_result(res, wipe)
return { default = { deltas = res, wipe = wipe, }, }

local function full_sync_result()
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
local function full_sync_result()
local function full_sync()

The name is not very proper

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Talked offline, it is not a blocker.

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.

5 participants