[erlang-questions] Mnesia: aborting a transaction from withinmnesia_lib:db_put (help!!!)
Ulf Wiger (TN/EAB)
ulf.wiger@REDACTED
Tue Jul 17 01:09:45 CEST 2007
You cannot abort a transaction from within
these functions. The transaction has already
been committed when they are called. The
function is expected to work; if it fails, mnesia
will dump core.
BR,
Ulf W
> -----Original Message-----
> From: erlang-questions-bounces@REDACTED
> [mailto:erlang-questions-bounces@REDACTED] On Behalf Of Joel Reymont
> Sent: den 16 juli 2007 22:48
> To: Erlang Questions
> Subject: [erlang-questions] Mnesia: aborting a transaction
> from withinmnesia_lib:db_put (help!!!)
>
> 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
>
>
>
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>
More information about the erlang-questions
mailing list