Closed arjan closed 7 months ago
hello! thanks for the report. What version oif Elixir and Erlang OTP are you running?
Otp 26, elixir 1.15
I see, yea I have not done any testing around that yet. it s related to the change they added in 1.15 . https://hexdocs.pm/elixir/1.15/changelog.html#potential-incompatibilities . Can you try this in your project and see if that helps?
+1, getting the same error on a fresh install of Hammer 6.2 on Elixir 1.15.6 and OTP 26
I see, yea I have not done any testing around that yet. it s related to the change they added in 1.15 . https://hexdocs.pm/elixir/1.15/changelog.html#potential-incompatibilities . Can you try this in your project and see if that helps?
Tried this, did not help. Looking at the code I don't see where these atoms are getting instantiated prior to String.to_existing_atom/1 call
Hammer.Supervisor
fails to start because it assumes the hammer backend names already exist in the atom pool.
@arjan I am (edit:)ALMOST able to bypass this bug by changing my hammer backend:
config value from a list to a single tuple like so:
config :hammer,
backend: {
Hammer.Backend.ETS,
[
expiry_ms: 60_000 * 60 * 2,
cleanup_interval_ms: 300_000 * 2
]
}
because single-backend config uses a single static default pool atom, HOWEVER when I do this I run into the following error when trying to call Hammer:
** (exit) an exception was raised:
** (ArgumentError) errors were found at the given arguments:
* 1st argument: not an already existing atom
:erlang.binary_to_existing_atom("hammer_backend_ets_pool", :utf8)
(hammer 6.2.0) lib/hammer/utils.ex:9: Hammer.Utils.pool_name/1
(hammer 6.2.0) lib/hammer.ex:255: Hammer.call_backend/3
(hammer 6.2.0) lib/hammer.ex:51: Hammer.check_rate/4
new issue opened #88
Hammer.Supervisor
fails to start because it assumes the hammer backend names already exist in the atom pool.Easily reproducible with running the following in
iex
:Crashes in the following way: