aboutsummaryrefslogtreecommitdiffstats
path: root/lib/mnesia/src/mnesia_tm.erl
AgeCommit message (Collapse)Author
2018-07-27Change "can not" into "cannot"Raimo Niskanen
I did not find any legitimate use of "can not", however skipped changing e.g RFCs archived in the source tree.
2018-06-18Update copyright yearHenrik Nord
2018-03-16mikpe/process_info-1-no-messages/PR-1745/OTP-14986Lukas Larsson
make erlang:process_info/1 not retrieve messages
2018-03-10make erlang:process_info/1 not retrieve messagesMikael Pettersson
process_info/1 retrieves a number of properties related to a process, including the list of messages in its mailbox. This is potentially unsafe if the target process has a large number of queued messages: - there is no a priori upper bound on the amount of memory being allocated to hold that list, and - the loop to retrieve the messages is uninterruptible, so the Erlang scheduler where this executes blocks for the duration We've seen process_info/1 bring down heavily loaded nodes on more than one occasion. At least once it appeared to have blocked the Erlang heart process from executing, causing the external heart to kill the VM. Consequently this removes 'messages' from the list of process_info tags to retrieve for process_info/1. Note that process_info/1 still retrieves 'message_queue_len', and process_info/2 can still retrieve 'messages' when asked to. A few places in the OTP libraries need minor adjustments, since they want 'message_queue_len' but compute it from the length of the list of messages.
2018-02-06mnesia: Do not call erlang:get_stacktrace() (cont)Hans Bolinder
Take care of the call of erlang:get_stacktrace() in module mnesia_lib.
2018-02-06mnesia: Do not call erlang:get_stacktrace()Hans Bolinder
The remaining call (in module mnesia_lib) is taken care of in the following commit.
2017-09-05mnesia: Improve handling of UnicodeHans Bolinder
2016-11-28Use off_heap memory queue for mnesia_tmDan Gudmundsson
Helps when mnesia_tm gets drowned in dirty_writes from remote node.
2016-10-17Avoid some error reports when stopping mnesiaDan Gudmundsson
Worker processes can cause error reports if the main mnesia processes dissapear.
2016-05-09Merge branch 'dgud/mnesia/ext-backend/PR-858/OTP-13058'Dan Gudmundsson
* dgud/mnesia/ext-backend/PR-858/OTP-13058: mnesia_ext: Add basic backend extension tests mnesia_ext: reuse snmp field for ext updates mnesia_ext: Create table/data containers from mnesia monitor not temporary processes mnesia_ext: Implement ext copies index mnesia_ext: Load table ext mnesia_ext: Dumper and schema changes mnesia_ext: Refactor mnesia_schema.erl mnesia_ext: Ext support in fragmented tables mnesia_ext: Backup handling mnesia_ext: Create schema functionality mnesia_ext: Add ext copies and db_fold to low level api mnesia_ext: Refactor record_validation code mnesia_ext: Add create_external and increase protocol version to monitor mnesia_ext: Add ext copies to records mnesia_ext: Add supervisor and behaviour modules
2016-05-09mnesia_ext: reuse snmp field for ext updatesDan Gudmundsson
Minimal impact when talking to older nodes.
2016-05-09mnesia_ext: Implement ext copies indexUlf Wiger
Make ram_copies index always use ordered_set And use index type as prefered type not a implementation requirement, the standard implmentation will currently ignore the prefered type.
2016-05-09mnesia_ext: Add ext copies to recordsUlf Wiger
2016-04-13Merge branch 'henrik/update-copyrightyear'Henrik Nord
* henrik/update-copyrightyear: update copyright-year
2016-03-17mnesia: Send mnesia_down messages to waiting transactionsDan Gudmundsson
Mnesia didn't forward mnesia_down to transactions which where already decided to be aborted, but that could lead to hanging transactions still waiting for messages from the node which had stopped.
2016-03-15update copyright-yearHenrik Nord
2015-06-18Change license text to APLv2Bruce Yinhe
2015-03-27mnesia: Replace catch with try-catchDan Gudmundsson
Avoids building stacktraces where it is not needed and do not mask errors, i.e. only catch the relevant classes in each try.
2014-02-20mnesia: cleanup some dialyzer unmatched return warningsDan Gudmundsson
2013-11-25mnesia: Synchronize lock cleanup after mnesia downDan Gudmundsson
Bad timing could lead to hanging transactions after a mnesia down from a node with sticky locks. Excellent bug report from janchochol Situation: * node A and B have copies of table T * node A ows sticky of table T * node A goes down (e.g. crash) * node B tries to perform transactional operation on table T (e.g. mnesia:select) In this situation there is possibility that first (and maybe other) transaction on node B will hang indefinitely. This is caused by race condition, when transaction process send lock request operation to node A and waits for reply. When node A is down it will never send reply, so process on node B will be stuck forever. Reason is that message sent to mnesia_locker gen_server from mnesia_locker:mnesia_down can be received after mnesia_locker gen_server already replies to transaction processes with {switch, N, Req} and node N is down. Monitoring remote process when sending request to other node should be safe solution.
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