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

Use of :ets reference after delete #120

Closed
escobera opened this issue May 6, 2021 · 3 comments
Closed

Use of :ets reference after delete #120

escobera opened this issue May 6, 2021 · 3 comments

Comments

@escobera
Copy link
Contributor

escobera commented May 6, 2021

Hello there, after some time running I'm being hit with some argument errors here.

** (ArgumentError) argument error
--
  | (stdlib 3.14) :ets.take(#Reference<0.430097009.965083137.200472>, "SISTJ@1\|\|20120110078872")
  | (nebulex 2.0.0) lib/nebulex/adapters/local.ex:695: Nebulex.Adapters.Local.pop_entry/4
  | (nebulex 2.0.0) lib/nebulex/adapters/local.ex:420: Nebulex.Adapters.Local.gen_fetch/5
  | (nebulex 2.0.0) lib/nebulex/adapters/local.ex:412: Nebulex.Adapters.Local.do_get/4
  | (nebulex 2.0.0) lib/nebulex/adapters/local.ex:401: Nebulex.Adapters.Local.get/3
  | (antecedentes_api 0.1.0) lib/antecedentes_api/servicos/processos_api.ex:26: AntecedentesApi.Servicos.ProcessosApi.carregar_dados_processo/2
  | (antecedentes_api 0.1.0) lib/antecedentes_api/filtros/filtrador.ex:53: AntecedentesApi.Filtros.Filtrador.executar_filtros_de_processo/1
  | (antecedentes_api 0.1.0) lib/antecedentes_api/filtros/filtrador.ex:14: AntecedentesApi.Filtros.Filtrador.filtrar/1
  | Function: #Function<5.84974940/0 in AntecedentesApi.Etl.handle_cast/2>
  | Args: []

I have 10 different tasks acessing the cache concurrently. Maybe the local adapter has an old invalid reference when it tries to access the backend? Is it preventable?

@cabol
Copy link
Owner

cabol commented May 7, 2021

@escobera good catch! I was able to reproduce the issue, I created a separate issue describing the scenario and also pushed the fix to the master branch, which should fix this problem too. Please try it out and let me know if it works for you. If so, I will publish a new release this weekend with the last changes.

@escobera
Copy link
Contributor Author

escobera commented May 7, 2021

I'm deploying pointing to master, will run some heavy stuff here and report back. Thank you!

@escobera
Copy link
Contributor Author

escobera commented May 7, 2021

Everything looks fine for now, I'm closing this. Thanks a lot! =)

@escobera escobera closed this as completed May 7, 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