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

handle_rpc_multi_call/3 doesn't handle empty list in res argument #136

Closed
hazardfn opened this issue Oct 5, 2021 · 1 comment
Closed

Comments

@hazardfn
Copy link

hazardfn commented Oct 5, 2021

It seems as if the res argument in handle_rpc_multi_call/3 can be an empty list in some scenarios? in one of the pattern matches hd/1 can be called on that list throwing a badarg error:

$DATE [info] module=xxx line=290 pid=<0.14531.45> | Terminating process for x/27 -- {:badarg, [{:erlang, :hd, [[]], []}, {Nebulex.Adapters.Replicated, :handle_rpc_multi_call, 3, [file: 'lib/nebulex/adapters/replicated.ex', line: 568]}, {Nebulex.Adapters.Replicated, :do_transaction, 6, [file: 'lib/nebulex/adapters/replicated.ex', line: 264]}, {:global, :trans, 4, [file: 'global.erl', line: 429]}, {Nebulex.Adapters.Replicated, :put, 6, [file: 'lib/nebulex/adapters/replicated.ex', line: 405]}, {Nebulex.Adapters.Replicated, :"-put/6-fun-0-", 7, [file: 'lib/nebulex/adapters/replicated.ex', line: 404]}, {:telemetry, :span, 3, [file: '/tomahawk/deps/telemetry/src/telemetry.erl', line: 293]}, {Nebulex.Cache.Entry, :put, 4, [file: 'lib/nebulex/cache/entry.ex', line: 42]}]}
@cabol
Copy link
Owner

cabol commented Nov 13, 2021

Hey! sorry for the lateness, the good news is I found the root of the issue and it is fixed now. Please try it out and let me know if it worked. In the meantime, I will close the issue but feel free to reopen it if you come across the error again.

@cabol cabol closed this as completed Nov 13, 2021
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

No branches or pull requests

2 participants