<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Hi Dan,</div><div>The default is actually disc_opt which then falls back to ram (since there's no schema on disk).</div><div><br></div><div>My question though is: any risks / other tradeoffs I should be aware of by doing this, instead of having a disk schema?<br><br>Thanks,</div><div>r.<br><br></div><div><br>On 09/mar/2015, at 21:19, Dan Gudmundsson <<a href="mailto:dangud@gmail.com">dangud@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr">Sure, you do not need to specify schema_location ram since that is the default if<div>no schema exists on disc.</div><div><br></div><div>Just be sure that all nodes in cluster are in the nodes() list.</div><div><br></div><div>/Dan</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 9, 2015 at 4:11 PM, Roberto Ostinelli <span dir="ltr"><<a href="mailto:roberto@widetag.com" target="_blank">roberto@widetag.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Dear list,<div>I am starting MNESIA in RAM only mode, with the option [1]:</div><div><br></div><div><font face="monospace, monospace">      -mnesia schema_location ram</font>.</div><div><br></div><div>Every time I start a gen_server, I first ensure to add all the other nodes in the island like so:</div><div><br></div><div><font face="monospace, monospace">      mnesia:change_config(extra_db_nodes, [node() | nodes()]).</font></div><div><br></div><div>I then create the table I need:</div><div><br></div><div><div><font face="monospace, monospace">      mnesia:create_table(cometa_online_devices, [</font></div><div><font face="monospace, monospace">          {type, set},</font></div><div><font face="monospace, monospace">          {ram_copies, [node() | nodes()]},</font></div><div><font face="monospace, monospace">          {attributes, record_info(fields, my_record)},</font></div><div><font face="monospace, monospace">          {index, [#my_record.pid]},</font></div><div><font face="monospace, monospace">          {storage_properties, [{ets, [{read_concurrency, true}]}]}</font></div><div><font face="monospace, monospace">      ])</font></div></div><div><br></div><div>I do so mainly to avoid the hassle of creating a schema. As you can see I only use ram tables.</div><div><br></div><div>My question here is: is this an appropriate use? What kind of problems may I get myself into by not using a disc schema?</div><div><br></div><div>Thank you,</div><div>r.</div><div><br></div><div><br></div><div><br></div><div>[1] <a href="http://www.erlang.org/doc/apps/mnesia/Mnesia_chap5.html#id76396" target="_blank">http://www.erlang.org/doc/apps/mnesia/Mnesia_chap5.html#id76396</a></div></div>
<br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><br></div>
</div></blockquote></body></html>