Skip to content

Conversation

@edgurgel
Copy link

Fix the type specs on nb_yield. As seen here on the tests the possible results:

{value, {badrpc, {'EXIT', {undef,[{os,timestamp_undef,[],[]},_]}}}} = gen_rpc:nb_yield(NBYieldKey, 500),

timeout = gen_rpc:nb_yield(NbYieldKey0, 5),

@zmstone
Copy link
Member

zmstone commented Dec 16, 2025

@edgurgel sorry for the delay.
i'll merge this now and fix the same specs for module gen_rpc

@zmstone zmstone merged commit 9ecc2c5 into emqx:master Dec 16, 2025
zmstone added a commit to zmstone/gen_rpc that referenced this pull request Dec 16, 2025
@edgurgel
Copy link
Author

edgurgel commented Dec 16, 2025

Thanks @zmstone ! BTW we have done a couple of changes that we could upstream if this is something that could be useful:

supabase#1 - Optional compression based on a compression threshold. Specially with the batch of casts this has been very handy as compressing with term_to_iovec is pretty straightforward.

supabase#3 - Pool of dispatchers + ignore "bad nodes" . I guess this one is a different approach compared to #49 .

Instead of a single gen_rpc_dispatcher this PR adds a pool of dispatchers partitioned by the NodeOrTuple.

We went with checking that the node is still connected because in our case we always have the node as part of the standard Erlang cluster but the async connection seems cleaner is it doesn't rely on having the referenced node part of the Erlang cluster.

And finally include abcast to the cast batch: supabase#2

@zmstone
Copy link
Member

zmstone commented Dec 16, 2025

Thank you @edgurgel

supabase#1 and supabase#2 looks interesting, we can accept it if you don't mind sending PRs to us.

zmstone added a commit to zmstone/gen_rpc that referenced this pull request Dec 16, 2025
@edgurgel
Copy link
Author

Done! #54 & #55

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants