Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

27 lines (17 sloc) 0.917 kB
$ERL_TOP/bin/erl -boot start_sasl -kernel dist_auto_connect once -sname n1 -pa ~/ETC/git/unsplit/ebin -mnesia debug trace
$ERL_TOP/bin/erl -boot start_sasl -kernel dist_auto_connect once -sname n2 -pa ~/ETC/git/unsplit/ebin -mnesia debug trace
mnesia:start().
application:start(unsplit).
rd(test,{key,modified=erlang:now(),value}).
On n2@debian:
mnesia:create_schema([n1@debian,n2@debian]).
mnesia:delete_table(test).
mnesia:create_table(test,[{ram_copies,[n1@debian,n2@debian]},{attributes,[key,modified,value]},{user_properties,[{unsplit_method,{unsplit_lib,last_modified,[]}}]}]).
mnesia:transaction(fun() -> mnesia:write(#test{key=1,value=a}) end).
mnesia:transaction(fun() -> mnesia:write(#test{key=2,value=a}) end).
ets:tab2list(test).
On n1@debian:
disconnect_node(n2@debian).
mnesia:transaction(fun() -> mnesia:write(#test{key=2,value=b}) end).
timer:sleep(3000).
net_kernel:connect_node(n2@debian).
Jump to Line
Something went wrong with that request. Please try again.