-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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): dp does not need concentrator #13829
base: master
Are you sure you want to change the base?
Conversation
This reverts commit 1f9d54f.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does _find_node_and_check_capability
needs updating and check as well?
No, in DP it should always return Adding an assert to ensure it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not a blocker
self.concentrator = concentrator.new(self, kong.db) | ||
if conf.role == "control_plane" then | ||
self.concentrator = require("kong.clustering.rpc.concentrator").new(self, kong.db) | ||
self.client_ips = {} -- store DP node's ip addr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about make client_ips
a part of concerntrator
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about it, but I think collecting ip addresses is not the responsibility of concentrator.
|
||
if self.concentrator then | ||
self.client_ips[node_id] = nil | ||
assert(self.concentrator:_enqueue_unsubscribe(node_id)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and so it can be a part of unsubscribe
Summary
KAG-5730
Checklist
changelog/unreleased/kong
orskip-changelog
label added on PR if changelog is unnecessary. README.mdIssue reference
Fix #[issue number]