This document describes the changes made to the Mnesia system from version to version. The intention of this document is to list all incompatibilities as well as all enhancements and bugfixes for every release of Mnesia. Each release of Mnesia thus constitutes one section in this document. The title of each section is the version number of Mnesia.
Fix timing issues in checkpoint creation.
Own Id: OTP-10957
Fixed a problem where the fallback BUP file is removed when calling mnesia:uninstall_fallback and mnesia is not started.
Own Id: OTP-11241
If mnesia:clear_table/2 was called during a table load on that table, the schema record was written to the table instead of clearing table.
Own Id: OTP-11030 Aux Id: seq12267
Optimize index creation for Mnesia set tables. Thanks to Nick Marino.
Own Id: OTP-11103
Use chained send_after instead of send_interval, to make decrease the number of messages sent after a sleep (Thanks to James Wheare)
Own Id: OTP-10636
Fix format of mnesia overload message (Thanks to Ahmed Omar)
Own Id: OTP-10639
Added a general framework for executing benchmarks of Erlang/OTP. Benchmarks for the Erlang VM and mnesia have been incorporated in the framework.
For details about how to add more benchmarks see $ERL_TOP/HOWTO/BENCHMARKS.md in the source distribution.
Own Id: OTP-10156
Where necessary a comment stating encoding has been added to Erlang files. The comment is meant to be removed in Erlang/OTP R17B when UTF-8 becomes the default encoding.
Own Id: OTP-10630
Remove support for the query keyword and query expressions. Thanks to Loïc Hoguin.
Own Id: OTP-10729
Add tests showing that trying to delete non-existing object may corrupt the
In case of bag tables, trying to delete a non-existing object leads to the index becoming corrupt. This happens if the non-existing object we try to delete happens to share its key and index field value with a single existing object in the table. Result: The index entry corresponding to the existing object is removed.
Prevent index from being corrupted if a nonexistent item is deleted
We have to ensure that we actually delete the last object with a given (key, index) pair before removing the index. Thanks to Bartlomiej Puzon
Own Id: OTP-10220
Returns the same value for mnesia_loader:disc_load_table/2 as mnesia_loader:net_load_table/4 if a table copy can not be found. (Thanks to Uwe Dauernheim)
Own Id: OTP-10015
Improved table lock algorithm.
Own Id: OTP-9890
Reduce calls to phash in key_to_frag_number
Original code calls phash 1..2 times, based on which fragment the hashed key targets and how many fragments exist. New code always calls phash only once.
Add mnesia_frag_hash test (Thanks to Philip Robinson)
Own Id: OTP-9722
Fixed a sticky lock bug which caused mnesia:read(Tab, Key, write) return undefined.
Own Id: OTP-9786
Use the synchronous log_terms instead of alog_terms in mnesia_log:ets2dcd()
This avoids the situation where mnesia could dump a very large ets table in its entirety into the message queue of the disk_log process, causing memory blowup and choking the disk logger. (Thanks to Richard Carlsson)
Own Id: OTP-9804
Implemented a new option to mnesia:create_table/2 which allows the user to assign 'ets' and 'dets' options not available in mnesia.
Own Id: OTP-8970
Fix deadlock in mnesia:del_table_copy/2.
Own Id: OTP-9689 Aux Id: seq11927
Allow schema operations when using different mnesia versions.
Own Id: OTP-9657 Aux Id: seq11926
Fix protocol issues. Mnesia-4.4.19 could not communicate with to older nodes.
Own Id: OTP-9473
XML files have been corrected.
Own Id: OTP-9550 Aux Id: OTP-9541
Dump the log even if no transactions have been invoked on local node, otherwise the log will grow forever with decisions from the other nodes who have tables on disk. Thanks Marek Majkowski.
Own Id: OTP-9551
Use dedicated api for clear_table, i.e. instead of match_delete use delete_all_objects. Thanks KukHyun Lee.
Own Id: OTP-9558
Mnesia could crash if mnesia:add_table_index/2 was invoked before the table was loaded on all nodes.
Own Id: OTP-9285 Aux Id: seq11844
Add {majority, boolean()} per-table option.
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 transaction.(Thanks to Ulf Wiger)
Own Id: OTP-9304
Call chmod without the "-f" flag
"-f" is a non-standard chmod option which at least SGI IRIX and HP UX do not support. As the only effect of the "-f" flag is to suppress warning messages, it can be safely omitted. (Thanks to Holger Weiß)
Own Id: OTP-9170
Mnesia sometimes failed to update meta-information in large systems, which could cause table content to be inconsistent between nodes.
Own Id: OTP-9186 Aux Id: seq11728
Calling mnesia:first/1 on empty fragmented table works. Thanks Magnus Henoch.
Own Id: OTP-9108
If Mnesia detects that the network is not fully connected during start, Mnesia will not start until all nodes are reachable.
Own Id: OTP-9115 Aux Id: seq-11728
Fix issues reported by dialyzer.
Own Id: OTP-9107
Sometimes a 'log_header' record was added to tables when invoking mnesia:restore/2 with the option 'recreate_tables'. Thanks Vance Shipley.
Own Id: OTP-8960
Compiler warnings were eliminated.
Own Id: OTP-8855
Eliminated warnings for auto-imported BIF clashes.
Own Id: OTP-8840
Added mnesia:subscribe(activity) contributed by Bernard Duggan.
Own Id: OTP-8519
Transactions could be left hanging if a node went down when invoking mnesia:sync_transaction/[1,2]. Thanks Igor Ribeiro Sucupira.
Own Id: OTP-8402
Igor Ribeiro Sucupira added the option to compress data when copying tables between Mnesia nodes.
Own Id: OTP-8406
The documentation is now built with open source tools (xsltproc and fop) that exists on most platforms. One visible change is that the frames are removed.
Own Id: OTP-8250
Fixed duplicate results with mnesia:index_read() on ordered_set tables. Reported by Sam Bobroff.
Fixed locking in mnesia:index_read() which now grabs a read table lock to ensure correctness, this may slow down the operation or block other processes trying to reach the same table.
Calling mnesia:dump_log() could crash mnesia, Reported by Igor Ribeiro Sucupira.
Own Id: OTP-8074
Mnesia crashed if a qlc query was running inside a transaction when mnesia stopped at another node. Thanks Teemu Antti-Poika.
Own Id: OTP-7968
Mnesia could crash when loading local_content tables.
Own Id: OTP-8002 Aux Id: seq11277
Minor (smp) optimizations.
Own Id: OTP-7928
mnesia:clear_table/1 crashed instead of returning
Own Id: OTP-7911
With bad timing several api functions could return or exit with a bad error message when mnesia was shutting down.
Own Id: OTP-7753 Aux Id: seq11179
Own Id: OTP-7835
Disallowed match patterns ('_', and '$n') as argument to
Own Id: OTP-7524
Introduced a few new functions in Mnesia:
Own Id: OTP-7625
Own Id: OTP-7585 Aux Id: seq11046
mnesia:clear_table/1 does not require that all replicas of the table are available anymore.
Own Id: OTP-7466 Aux Id: seq11015
Mnesia did not garbage collect transaction decisions on disk based nodes if no transactions where made on the local node.
Own Id: OTP-7419
Table referred to by foreign key did not have node_pool properly cleaned up when a node was removed from the schema. Thanks Paul Mineiro.
Own Id: OTP-7340
Mnesia crashed and generated a core dump if a schema_transaction was running when mnesia stopped.
Own Id: OTP-7378 Aux Id: seq10964
It is now possible to delete a db node even when other disk resident nodes are down. Thanks Paul Mineiro.
Own Id: OTP-7383
Sticky locks could lead to hanging transactions.
Own Id: OTP-7205 Aux Id: seq10793
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-7208
Snmp index tables was not initialized correctly in
Own Id: OTP-7170 Aux Id: seq10870
Rearranging fragmented tables is an O(N^2) operation.
Own Id: OTP-6300
Mnesia ignored the module argument to
Own Id: OTP-6981
Mnesia's snmp operations
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-6856 Aux Id: seq10671
Introduced erlang:phash/2 as new default for fragmented tables. Already existing tables will continue to use whatever hash function they where using.
Own Id: OTP-6923
Introduced
Own Id: OTP-6995 Aux Id: seq10812
Rearranging fragmented tables is an O(N^2) operation.
Own Id: OTP-6300