-
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
feat(clustering/rpc): update dp status after syncing #14205
Conversation
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.
The solution should work. An improvement is possible
|
||
-- version changed, we should update status | ||
if version_before_sync ~= current_version then | ||
update_status(current_version) |
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.
We could start a timer to call the notification here as it ignores the response , so to release the lock quicker
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.
The rpc notification is very cheap, I think that we need not to run a new timer here.
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.
i checked the inside logic of notify, there's no block logic, at last, it will call msg push, is it right ? so i think we do not need to introduce a timer
final logic of notify()
notify
-> fut.start
-> socket: call
->
-- asynchronously start executing a RPC, _node_id is not
-- needed for this implementation, but it is important
-- for concentrator socket, so we include it just to keep
-- the signature consistent
function _M:call(node_id, method, params, callback)
assert(node_id == self.node_id)
local id
-- notification has no callback or id
if callback then
id = self:_get_next_id()
self.interest[id] = callback
end
return self:push_request({
jsonrpc = jsonrpc.VERSION,
method = method,
params = params,
id = id,
})
end
@chronolaw @ADD-SP Let's move this PR forward and after merging this we can close #14194 |
e907f8c
to
c894e85
Compare
Cherry-pick is blocked by #14195 . |
Summary
KAG-6223
Checklist
changelog/unreleased/kong
orskip-changelog
label added on PR if changelog is unnecessary. README.mdIssue reference
Fix #[issue number]