Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我认为我很好地创建了 mnesia,因为我在一个节点中添加了记录,并且我可以在另一个节点的同一张表中看到它。这证明它有效吗?
您涵盖了分发 - 干得好;)缺少的部分是持久性。确保您的模式和表在磁盘上(而不是在内存中)——当然只有在需要时。
你的朋友是:
mnesia:change_table_copy_type(schema, node(), disc_copies). mnesia:add_table_copy(SomeTableName, node(), disc_copies).
通常它需要重新启动才能应用更改。
您可以查阅 mnesia:info() 以查看您的数据库的外观。