redlock icon indicating copy to clipboard operation
redlock copied to clipboard

Is FastGlobal really necessary?

Open warmwaffles opened this issue 1 year ago • 0 comments

Currently we are seeing this in our compile warnings

warning: using map.field notation (without parentheses) to invoke function :"Elixir.FastGlobal.redlock_conf".value() is deprecated, you must add parentheses instead: remote.function()
  (fastglobal 1.0.0) lib/fastglobal.ex:49: FastGlobal.do_get/2
  (redlock 1.0.21) lib/redlock/connection_keeper.ex:51: Redlock.ConnectionKeeper.handle_info/2
  (stdlib 6.1.2) gen_server.erl:2345: :gen_server.try_handle_info/3
  (stdlib 6.1.2) gen_server.erl:2433: :gen_server.handle_msg/6
  (stdlib 6.1.2) proc_lib.erl:329: :proc_lib.init_p_do_apply/3

There is a PR to fix this https://github.com/discord/fastglobal/pull/28

But this library has not seen an update in 7 years, which is cool, but I don't think anyone is actually maintaining it. Could Redlock.NodeChooser be a genserver instead? I can build up a PR to facilitate this change.

I also think for the Redlock.Util.log/3 it needs to swap over to using Application.get_env/2 or simply do away with the configured log level check and simply use Logger directly.

warmwaffles avatar Nov 06 '24 18:11 warmwaffles