aboutsummaryrefslogtreecommitdiffstats
path: root/lib/mnesia/src/mnesia_tm.erl
AgeCommit message (Collapse)Author
2013-01-25Update copyright yearsBjörn-Egil Dahlberg
2012-10-01mnesia: Use chained send_after instead of send_intervalJames Wheare
timer:send_interval behaves badly when resuming from sleep on some platforms. For example, if I sleep for 10 minutes, and have a send_interval running once per minute, when I resume, 10 messages will be sent immediately, eliminating the benefit of only running the work periodically. This is admittedly a separate bug with send_interval, but the workaround is straightforward, and also protects from messages piling up in the queue when the work takes longer than the interval. This patch fixes piled up error reports on resume from sleep: ** WARNING ** Mnesia is overloaded: {dump_log, write_threshold} You'll still be warned if mnesia is overloaded, just not repeatedly. Additionally, erlang:send_after is more efficient than using the timer module equivalent [1] [1] http://www.erlang.org/doc/efficiency_guide/commoncaveats.html#id57251
2011-12-06[mnesia] Whitespace fixesDan Gudmundsson
2011-05-16dialyzer warning on mnesia_tmUlf Wiger
2011-05-16bug in mnesia_tm:needs_majority/2Ulf Wiger
2011-05-16Write locks now check majority when needed.Ulf Wiger
Since the table loader also sets (table) write locks, a special lock type, 'load', was needed. Unfortunately, this affects mnesia activity callbacks that redefine the lock operation.
2011-05-16Add {majority, boolean()} per-table option.Ulf Wiger
With {majority, true} set for a table, write transactions will abort if they cannot commit to a majority of the nodes that have a copy of the table. Currently, the implementation hooks into the prepare_commit, and forces an asymmetric transaction if the commit set affects any table with the majority flag set. In the commit itself, the transaction will abort if it cannot satisfy the majority requirement for all tables involved in the thransaction. A future optimization might be to abort already when a write lock is attempted on such a table (/-object) and the lock cannot be set on enough nodes. This functionality introduces the possibility to automatically "fence off" a table in the presence of failures. This is a first implementation. Only basic tests have been performed.
2011-03-02Mnesia dialyzer fixesDan Gudmundsson
With help from Kostis
2010-03-30Add mnesia activity subscription messageBernard Duggan
A process that calls mnesia:subscribe(activity) will receive the message: {mnesia_activity_event, ActivityID, complete} when any activity that caused a change to a database has finished committing its changes. This allows a subscriber to collect messages already available through the mnesia:subscribe({table, ...}) system to group them as completed transactions.
2010-02-04OTP-8402 Transactions could be left hanging if a node went down whenDan Gudmundsson
invoking mnesia:sync_transaction/[1,2]. Thanks Igor Ribeiro Sucupira.
2009-11-20The R13B03 release.OTP_R13B03Erlang/OTP