Skip to content

ETS table from eredis_cluster_monitor not found at start-up #63

@luiz-firework

Description

@luiz-firework

Hi, here's a summary of what's been happening:

  • I have an app (inside an umbrella) that provides cache for the other applications (we call it redis_cache). It depends on :eredis_cluster.
  • :redis_cache is loaded as a dependency on the main application
  • I have a library that uses :redis_cache as a backend and is also a dependency of the main application. This library starts a genServer that reads from redis_cache at initialization. Everything is started in proper order.

However, when trying to boot the application in staging, I'm getting the below error and the system crashes.

** (ArgumentError) errors were found at the given arguments:

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

    (stdlib 3.17.2) :ets.lookup(:eredis_cluster_default, :cluster_state)
    (eredis_cluster 0.8.0) src/eredis_cluster_monitor.erl:71: :eredis_cluster_monitor.get_state/1
    (eredis_cluster 0.8.0) src/eredis_cluster.erl:623: :eredis_cluster.query/4
    (redis_cache 0.1.0) lib/redis_cache/adapters/eredis_cluster.ex:9: RedisCache.Adapters.EredisCluster.command!/1
    (redis_cache 0.1.0) lib/redis_cache/store/redis.ex:18: RedisCache.Store.Redis.get/1
    (ex_rate_limiter 0.1.5) lib/ex_rate_limiter/dynamic_limits_server.ex:62: anonymous fn/2 in ExRateLimiter.DynamicLimitsServer.get_cache_values/0
    (elixir 1.13.3) lib/enum.ex:2396: Enum."-reduce/3-lists^foldl/2-0-"/3
    (ex_rate_limiter 0.1.5) lib/ex_rate_limiter/dynamic_limits_server.ex:61: ExRateLimiter.DynamicLimitsServer.get_cache_values/0

If :eredis_cluster has been started at this point, how come the ETS table for eredis_cluster_monitor isn't present yet?

Please let me know if you need more details and thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions