I’m facing a puzzling behavior using mnesiac, the distributed store almost works.
I have 2 hosts connected via libcluster. I can :mnesia.write
on one host, then :mnesia.read
on another, all good. However, when I shut down one host, the store gets cleared on the other. And it only happens in one direction: if I shut down the other host, all works fine, as if there were a “master” host that should always stay on (I can’t trace such a possibility in the docs).
Does it ring a bell? I tried all sorts of experiments, but still can’t figure it out. Thanks for any pointers!
Some relevant console bits:
iex(ultramemory_prod@app2.local)7> PairsOne.GameStore.store_options
[
record_name: :games,
attributes: [:id, :cards],
index: [],
ram_copies: [:"ultramemory_prod@app2.local"]
]
iex(ultramemory_prod@app2.local)1> Mnesiac.running_nodes
[:"ultramemory_prod@app1.local", :"ultramemory_prod@app2.local"]