electric icon indicating copy to clipboard operation
electric copied to clipboard

ArgumentError: errors were found at the given arguments:

Open sentry[bot] opened this issue 5 months ago • 1 comments

Sentry Issue: ELECTRIC-40B

ArgumentError: errors were found at the given arguments:

  * 1st argument: the table identifier does not refer to an existing ETS table

  Module "ets", in :ets.lookup/2
  File "lib/electric/lsn_tracker.ex", line 26, in Electric.LsnTracker.get_last_processed_lsn/1
  File "lib/electric/shapes/api.ex", line 839, in Electric.Shapes.Api.get_global_last_seen_lsn/1
  File "lib/electric/shapes/api.ex", line 394, in Electric.Shapes.Api.determine_global_last_seen_lsn/1
  File "lib/electric/shapes/api.ex", line 663, in Electric.Shapes.Api.hold_until_change/1
...
(25 additional frame(s) were not displayed)

sentry[bot] avatar Aug 12 '25 09:08 sentry[bot]

I think this continues to just be a consequence of the fact that the stack might fall over during the lifetime of a request (see https://github.com/electric-sql/electric/pull/2848).

I had added an additional check to account for such races, but ultimately since this ETS table is owned by the shape log collector which might die at any time this can always occur.

I'm unsure what the best way to handle such requests is, and if there is a generally accepted pattern in Elixir given the "let it crash" philosophy for handling long running requests (return 500s and let the clients restart? or detect the 500s and retry the request processing ourselves?)

msfstef avatar Aug 19 '25 09:08 msfstef