Closed kelostrada closed 6 years ago
I think I would rather take a slightly different approach to this. The default type of the configuration should be an integer, but we could support binaries by casing the result of Application.get_env/3
to see if it is an integer or a binary, and call Integer.parse/1
if it is a binary. This also allows us to validate the value for :static_quorum_size
to ensure it's a non-zero, positive integer, and raise if invalid. Can you make that change?
Sure I'll get to that tomorrow :) Do you want some custom type of exception or just raise a message?
I've updated the PR with your suggestions, please review again
Thanks!
When loading envs from erlang variables in releases the variables are loaded as strings as far as I know.
Then this happens: "5" < 2
Which results in always giving
:undefined
as a proposed node byStaticQuorumRing