Mnesia transform_table with multiple disc_copies nodes

Dan Gudmundsson <>
Wed Dec 21 16:29:13 CET 2005


Hmm

The fun have to be known on every node, load the module
on every node (exact the same version on all nodes).

/Dan

Fredrik Thulin writes:
 > Hi
 > 
 > How do I make use of mnesia:transform_table/3 when I have more than one 
 > node with disc_copies of a table?
 > 
 > -module(t).
 > 
 > -export([do/1]).
 > 
 > do(Table) ->
 >     Attrs = mnesia:table_info(Table, attributes),
 >     io:format("Attributes of table ~p : ~p~n", [Table, Attrs]),
 >     F = fun(X) ->
 >                 X
 >         end,
 >     mnesia:transform_table(Table, F, Attrs).
 > 
 > 
 > ()6> t:do(regexproute).
 > Attributes of table regexproute : [regexp,flags,class,expire,address]
 > {aborted,{"Bad transform function",
 >           regexproute,
 >           #Fun<t.0.76598778>,
 >           '',
 >           {undef,[{#Fun<t.0.76598778>,
 > ...
 > 
 > My fun F is (of course) unknown on the other node  
 > ''.
 > 
 > Thanks in advance and a merry christmas to you all
 > 
 > /Fredrik

-- 
Dan Gudmundsson               Project:    Mnesia, Erlang/OTP
Ericsson Utvecklings AB       Phone:      +46  8 727 5762 
UAB/F/P                       Mobile:     +46 70 519 9469
S-125 25 Stockholm            Visit addr: Armborstv 1 




More information about the erlang-questions mailing list