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

sys:get_state/1 on partisan_gen_statem process fails #258

Open
hauleth opened this issue Jun 24, 2024 · 2 comments
Open

sys:get_state/1 on partisan_gen_statem process fails #258

hauleth opened this issue Jun 24, 2024 · 2 comments

Comments

@hauleth
Copy link

hauleth commented Jun 24, 2024

It seems that the problem comes out from the fact, that OTP gracefully handles situation when system_get_state/1 callback returns different value than {ok, term()}:

https://github.com/erlang/otp/blob/412bff5196fc0ab88a61fe37ca30e5226fc7872d/lib/stdlib/src/sys.erl#L511-L512

Copying this code to priv/otp/24/partisan_sys.erl fixes the problem.

@hauleth hauleth changed the title sys:get_state/1 on partisan_gen_statem process fails sys:get_state/1 on partisan_gen_statem process fails Jun 24, 2024
@aramallo
Copy link
Collaborator

Thanks @hauleth I will review ASAP

@aramallo
Copy link
Collaborator

aramallo commented Jul 6, 2024

Hi @hauleth sorry for the belated response.

Are you calling partisan_sys:get_state/1 on a partisan_gen_statem process or are you calling sys:get_state/1 on it?
Cause using any sys functions on partisan_gen_* is not supported.

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