-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
I have few issues rolling out Memento on my application.
Implementation
- Application has 3+ pods at any point of time and is connected with Libcluster.
- In
application.exchildren are listed as follows
a.{Cluster.Supervisor, [get_topologies(), [name: MyApp.ClusterSupervisor]]}
b.MyApp.Mnesia.MigrateTask.child_spec()
defmodule MyApp.Mnesia.MigrateTask do
def child_spec() do
%{
id: MODULE,
start: {Task, :start_link, [fn -> setup() end]},
type: :worker,
restart: :temporary
}
end
def setup() do
# I inspected here, all the nodes were connected here.
nodes = [node() | Node.list()]
# Stop Memento all nodes
:rpc.multicall(nodes, Memento, :stop, [])
# Create schema on all nodes
Memento.Schema.create(nodes)
# Start Memento all nodes
:rpc.multicall(nodes, Memento, :start, [])
# Create ram copies on all nodes
Memento.Table.create!(MyApp.MetaSchema, ram_copies: nodes)
end
end
Table Schema
defmodule QueryQuest.Mnesia.MetaSchema do
use Memento.Table, attributes: [:key, :value]
end
- After the pods are up, through remote console checked
Mememto.info. I see all pods are onrunning db nodes.
Issue
But I queryall for the Table.
Memento.transaction!(fn ->
Memento.Query.all(MyApp.MetaSchema)
end)
Error
** (Memento.Error) Transaction Failed with: {:no_exists, MyApp.MetaSchema}
(memento 0.3.2) lib/memento/transaction.ex:178: Memento.Transaction.handle_result/1
I'm trying to debug it, but its not succesful.
Metadata
Metadata
Assignees
Labels
No labels