-
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
fix(clustering): report node version in sync #13844
base: master
Are you sure you want to change the base?
Conversation
9546acb
to
af1f6b8
Compare
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.
This does not seems to be the right approach, it should ideally be done as part of "RPC handshake method change" work, as node version will not change between calls.
d11e6f5
to
0a9f335
Compare
@dndx I have changed the implementation, could you take a look again? thanks. |
+1. Please consider redesign the solution |
@@ -79,13 +80,14 @@ function _M:init_cp(manager) | |||
|
|||
-- { default = { version = 1000, }, } | |||
local default_namespace_version = default_namespace.version | |||
local node_info = assert(kong.rpc:get_peer_info(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.
For other reviewers, if assertion failed, it will break up a single timer runtime, so it's safe for CP.
- kong/clustering/rpc//socket.lua: callback is runned in a timer
-- call dispatch
local res, err = kong.timer:named_at(string_format("JSON-RPC callback for node_id: %s, id: %d, method: %s",
self.node_id, payload.id, payload.method),
0, _M._dispatch, self, dispatch_cb, payload)
This seems to be going to be covered by a new change. Are we going to close this? |
Summary
May change after KAG-5369 and #13887
KAG-5772
Checklist
changelog/unreleased/kong
orskip-changelog
label added on PR if changelog is unnecessary. README.mdIssue reference
Fix #[issue number]