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

feat(clustering/rpc): support rpc batching on dp side #14040

Merged
merged 50 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
eaffa3e
self:push_result
chronolaw Dec 20, 2024
0f613c0
push_request
chronolaw Dec 21, 2024
fc69a8a
process_rpc_msg
chronolaw Dec 21, 2024
493d0bd
lint fix
chronolaw Dec 21, 2024
de125d6
payload_array
chronolaw Dec 22, 2024
460e404
typo fix
chronolaw Dec 22, 2024
b5af4ba
lint fix
chronolaw Dec 22, 2024
36ec7c7
fix mistake
chronolaw Dec 22, 2024
d6c1f0a
lint fix
chronolaw Dec 22, 2024
d739a7f
lint fix
chronolaw Dec 22, 2024
cc9a6e3
isempty
chronolaw Dec 22, 2024
bca76b8
payload_method
chronolaw Dec 22, 2024
3c4e27c
clean
chronolaw Dec 22, 2024
5a6fca8
push_response
chronolaw Dec 23, 2024
146a2bb
clean
chronolaw Dec 24, 2024
dc3f348
check payload
chronolaw Dec 27, 2024
063ef02
isempty payload
chronolaw Dec 27, 2024
ceac4d9
lint fix
chronolaw Dec 27, 2024
7c688f4
comments
chronolaw Dec 30, 2024
37d64b2
err msg
chronolaw Dec 30, 2024
43b259a
push_request
chronolaw Jan 5, 2025
072d172
bach sync call
chronolaw Jan 6, 2025
8c241bd
Revert "push_request"
chronolaw Jan 7, 2025
bd8c3b8
rpc.set_batch
chronolaw Jan 8, 2025
c610b33
clean
chronolaw Jan 8, 2025
5b38e48
add todo
chronolaw Jan 8, 2025
7a8a691
test v0
chronolaw Jan 8, 2025
7393ebb
pwait_until
chronolaw Jan 8, 2025
cdf21e1
more asserts
chronolaw Jan 8, 2025
1fb0ddf
more asserts
chronolaw Jan 8, 2025
d1357d9
test clean
chronolaw Jan 8, 2025
ba66025
small pwait_until
chronolaw Jan 8, 2025
8b9e574
flaky test
chronolaw Jan 8, 2025
8d6678e
flaky
chronolaw Jan 8, 2025
eb45038
code clean
chronolaw Jan 8, 2025
0873d5d
flaky comments
chronolaw Jan 8, 2025
e8d0235
typo fix
chronolaw Jan 8, 2025
4ec62d0
#batch_requests
chronolaw Jan 8, 2025
8dfc9fa
Revert "#batch_requests"
chronolaw Jan 9, 2025
e21a713
comments
chronolaw Jan 9, 2025
ae262fb
timeout 15
chronolaw Jan 9, 2025
fb05cdf
clean prefix
chronolaw Jan 10, 2025
effa63e
Revert "clean prefix"
chronolaw Jan 10, 2025
475baec
rpc connected event
chronolaw Jan 10, 2025
216ba9a
comments
chronolaw Jan 10, 2025
ff2bc4d
clean
chronolaw Jan 10, 2025
596ecba
test clean
chronolaw Jan 10, 2025
7ce13e2
comments for batch_size
chronolaw Jan 14, 2025
ef4f695
rename to __set_batch
chronolaw Jan 14, 2025
dc0699a
__batch_size
chronolaw Jan 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions kong/clustering/rpc/manager.lua
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ function _M.new(conf, node_id)
cluster_cert = assert(clustering_tls.get_cluster_cert(conf)),
cluster_cert_key = assert(clustering_tls.get_cluster_cert_key(conf)),
callbacks = callbacks.new(),

__batch_size = 0, -- rpc batching size, 0 means disable.
-- currently, we don't have Lua interface to initiate
-- a batch call, any value `> 0` should be considered
-- as testing code.
}

if conf.role == "control_plane" then
Expand Down Expand Up @@ -625,4 +630,12 @@ function _M:get_peer_info(node_id)
end


-- Currently, this function only for testing purpose,
-- we don't have a Lua interface to initiate a batch call yet.
function _M:__set_batch(n)
assert(type(n) == "number" and n >= 0)
self.__batch_size = n
end


return _M
Loading
Loading