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

Added mnesia statestore #88

Closed
wants to merge 1 commit into from
Closed

Conversation

sleipnir
Copy link
Member

@sleipnir sleipnir commented Oct 19, 2022

It looks like the library for Ecto Mnesia is out of date.

Run proxy:

MIX_ENV=prod PROXY_CLUSTER_STRATEGY=epmd PROXY_DATABASE_TYPE=native PROXY_DATABASE_NAME=eigr-functions-db  SPAWN_STATESTORE_KEY=3Jnb0hZiHIzHTOih7t2cTEPEpY98Tu1wvQkPfq/XwqE= iex --name spawn_a3@127.0.0.1 -S mix

Error on startup

2022-10-18 23:39:37.585 [spawn_a3@127.0.0.1]:[pid=<0.44.0> ]:[notice]:Application spawn_federated_example exited: SpawnFederatedExample.Application.start(:normal, []) returned an error: shutdown: failed to start child: SpawnSdk.System.Supervisor
    ** (EXIT) shutdown: failed to start child: Sidecar.Supervisor
        ** (EXIT) shutdown: failed to start child: Statestores.Supervisor
            ** (EXIT) an exception was raised:
                ** (UndefinedFunctionError) function Ecto.Adapters.Mnesia.execute_ddl/3 is undefined or private
                    (ecto3_mnesia 0.2.2) Ecto.Adapters.Mnesia.execute_ddl(%{adapter: Ecto.Adapters.Mnesia, cache: #Reference<0.2829300223.906625026.234028>, pid: #PID<0.6484.0>, repo: Statestores.Adapters.Mnesia}, {:create_if_not_exists, %Ecto.Migration.Table{name: :schema_migrations, prefix: nil, comment: nil, primary_key: true, engine: nil, options: nil}, [{:add, :version, :bigint, [primary_key: true]}, {:add, :inserted_at, :naive_datetime, []}]}, [timeout: :infinity, log: false, schema_migration: true, telemetry_options: [schema_migration: true]])
                    (ecto_sql 3.9.0) lib/ecto/migrator.ex:672: Ecto.Migrator.verbose_schema_migration/3
                    (ecto_sql 3.9.0) lib/ecto/migrator.ex:486: Ecto.Migrator.lock_for_migrations/4
                    (ecto_sql 3.9.0) lib/ecto/migrator.ex:398: Ecto.Migrator.run/4
                    (ecto_sql 3.9.0) lib/ecto/migrator.ex:146: Ecto.Migrator.with_repo/3
                    (statestores 0.1.0) lib/statestores/migrator/migrator.ex:9: Statestores.Migrator.migrate/0
                    (statestores 0.1.0) lib/statestores/supervisor.ex:20: Statestores.Supervisor.init/1
                    (stdlib 4.1) supervisor.erl:330: :supervisor.init/1
{"Kernel pid terminated",application_controller,"{application_start_failure,spawn_federated_example,{{shutdown,{failed_to_start_child,'Elixir.SpawnSdk.System.Supervisor',{shutdown,{failed_to_start_child,'Elixir.Sidecar.Supervisor',{shutdown,{failed_to_start_child,'Elixir.Statestores.Supervisor',{#{'__exception__' => true,'__struct__' => 'Elixir.UndefinedFunctionError',arity => 3,function => execute_ddl,message => nil,module => 'Elixir.Ecto.Adapters.Mnesia',reason => nil},[{'Elixir.Ecto.Adapters.Mnesia',execute_ddl,[#{adapter => 'Elixir.Ecto.Adapters.Mnesia',cache => #Ref<0.2829300223.906625026.234028>,pid => <0.6484.0>,repo => 'Elixir.Statestores.Adapters.Mnesia'},{create_if_not_exists,#{'__struct__' => 'Elixir.Ecto.Migration.Table',comment => nil,engine => nil,name => schema_migrations,options => nil,prefix => nil,primary_key => true},[{add,version,bigint,[{primary_key,true}]},{add,inserted_at,naive_datetime,[]}]},[{timeout,infinity},{log,false},{schema_migration,true},{telemetry_options,[{schema_migration,true}]}]],[]},{'Elixir.Ecto.Migrator',verbose_schema_migration,3,[{file,\"lib/ecto/migrator.ex\"},{line,672}]},{'Elixir.Ecto.Migrator',lock_for_migrations,4,[{file,\"lib/ecto/migrator.ex\"},{line,486}]},{'Elixir.Ecto.Migrator',run,4,[{file,\"lib/ecto/migrator.ex\"},{line,398}]},{'Elixir.Ecto.Migrator',with_repo,3,[{file,\"lib/ecto/migrator.ex\"},{line,146}]},{'Elixir.Statestores.Migrator',migrate,0,[{file,\"lib/statestores/migrator/migrator.ex\"},{line,9}]},{'Elixir.Statestores.Supervisor',init,1,[{file,\"lib/statestores/supervisor.ex\"},{line,20}]},{supervisor,init,1,[{file,\"supervisor.erl\"},{line,330}]}]}}}}}}},{'Elixir.SpawnFederatedExample.Application',start,[normal,[]]}}}"}
Kernel pid terminated (application_controller) ({application_start_failure,spawn_federated_example,{{shutdown,{failed_to_start_child,'Elixir.SpawnSdk.System.Supervisor',{shutdown,{failed_to_start_child,'Elixir.Sidecar.Supervisor',{shutdown,{failed_to_start_child,'Elixir.Statestores.Supervisor',{#{'__exception__' => true,'__struct__' => 'Elixir.UndefinedFunctionError',arity => 3,function => execute_ddl,message => nil,module => 'Elixir.Ecto.Adapters.Mnesia',reason => nil},[{'Elixir.Ecto.Adapters.Mnesia',execute_ddl,[#{adapter => 'Elixir.Ecto.Adapters.Mnesia',cache => #Ref<0.2829300223.906625026.234028>,pid => <0.6484.0>,repo => 'Elixir.Statestores.Adapters.Mnesia'},{create_if_not_exists,#{'__struct__' => 'Elixir.Ecto.Migration.Table',comment => nil,engine => nil,name => schema_migrations,options => nil,prefix => nil,primary_key => true},[{add,version,bigint,[{primary_key,true}]},{add,inserted_at,naive_datetime,[]}]},[{timeout,infinity},{log,false},{schema_migration,true},{telemetry_options,[{schema_migration,t

Crash dump is being written to: erl_crash.dump...done

@sleipnir sleipnir added help wanted Extra attention is needed statestores proxy labels Oct 19, 2022
@sleipnir sleipnir added this to the v1.0.0 milestone Oct 19, 2022
@sleipnir
Copy link
Member Author

sleipnir commented Nov 9, 2022

closed due to inactivity

@sleipnir sleipnir closed this Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed proxy statestores
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant