[erlang-questions] Mnesia: aborting a transaction from within mnesia_lib:db_put (help!!!)
Joel Reymont
joelr1@REDACTED
Mon Jul 16 22:48:06 CEST 2007
I extended mnesia_lib:db_put to look like this:
db_put(ram_copies, Tab, Val) -> ?ets_insert(Tab, Val), ok;
db_put(s3_copies, Tab, Val) -> s3db:db_put(Tab, Val);
db_put(disc_copies, Tab, Val) -> ?ets_insert(Tab, Val), ok;
db_put(disc_only_copies, Tab, Val) -> dets:insert(Tab, Val).
Note the call to s3db:db_put.
What do I return from this function to abort the enclosing Mnesia
transaction?
Whatever I return does not seem to make any effect. {aborted, ...}
doesn't do it and erlang:error(...) doesn't do it either.
Any clues?
Thanks, Joel
--
http://topdog.cc - EasyLanguage to C# compiler
http://wagerlabs.com - Blog
More information about the erlang-questions
mailing list