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.
mnesia:transform_table didn't work if table had indecies, it returned
{atomic, ok} but the meta-data was not transformed.
mnesia:select/[2|3] now works with fragmented tables.
mnesia:dump_tables/1 or
mnesia:change_table_copy(Tab, Node, disc_copies) on a
ram node (schema in ram) causes a crash in earlier mnesia-3.10.* releases.
mnesia:delete_object/[1|3] sometimes failed to delete
entries on set tables.
mnesia:select/[2|3] now works with fragmented tables.
Release mnesia-4.0 and later will only run OTP R8 and later.
mnesia:[dirty_]select/[2|3] has been added,
the function can and should be used to write complex queries.
mnesia:sync_transaction/[1|2|3] has been added,
the function can be used to avoid overloading mnesia on other nodes.
mnesia:read/3.
Release mnesia-4.0 and later will only run OTP R8 and later.
fallback_error_function now get's
the dying Node name as an argument.
disc_copies tables are not
implemented with dets anymore.
Mnesia can't be upgraded on the fly, it has to be restarted.
mnesia:clear_table/1 is documented.
mnesia:force_load_table/1 didn't check if the table was
already loaded and could crash mnesia if table was deleted during
execution.
transform_table now allows only meta-data transforms.
mnesia:table_info(Tab, type) performance on R7B has been
improved.
mnesia:all_keys/1 failed when using fragmented tables and
keys of list types.
mnesia:fold[lr] functions.
Records with lists as the Key field failed
to show up in fold functions if they where written
in the same transaction.
transform_table now supports indexes, but the dirty_index_*
operations may exit when the index is rebuilt.
The memory usage has been improved for set and ordered_set tables.
foldl/3 foldr/3 foldl/4 foldr/4,
together with dirty_last/1 and dirty_prev/2 for
ordered_set tables.
dirty_read fails during brutal kill of replicated node,
this is a synchronization problem. Mnesia now behaves better but can still
fail in worst case, use transactions if this behavior is not acceptable.
bag
tables.
fallback_error_function is
introduced to let the user handle the case when mnesia have a
fallback installed and and another mnesia goes down.
The default behavior is as it always been to kill it self to
avoid inconsistencies. The user can now start Erlang with
-mnesia fallback_error_function '{UserMod, UserFunc}'.
inconsistent_database
the only way to make it stop was to restart mnesia from a backup.
To allow the usage of master_nodes settings, mnesia now checks
if master_nodes (on the schema table) is set before reporting
the inconsistency event. If set the event will not be reported.
mnesia:[dirty]all_keys didn't work with
ordered_set tables.
mnesia:[dirty][index]_match_object didn't work in the latest
release, with index and wild_cards.
mnesia:subscribe({table, Tab, detailed}). and the
events look like {Operation, Table, Value, OldValues, Tid}.
mnesia:[dirty]index_match_object didn't work if the key
was bound or the table resided on another node.
mnesia:read(Tab, Key, write) could if the table
was deleted during the operation return a list of nodes.
mnesia:dump_to_textfile and mnesia:load_textfile
didn't work with record_names.
mnesia:transform_table/4 in order
to make it possible to handle new record types in code upgrades.
mnesia:match_object with partially unbound key
(e.g. Key = {bar, {'_', foo}}),
mnesia failed to detect that the key where unbound
which could result in hanging transactions.
Args argument to the functions:
mnesia:backup(Opaque,Args) and
mnesia:backup_checkpoint(Name,Opaque,Args) has
now been extended to also allow a list of options as a
complement to the old Mod atom.
{incremental,PrevName} option specifies the
name of a previously activated checkpoint, which
hopefully already has been backed up. All updates that
has been performed between the activation of the
PrevName checkpoint and the Name
checkpoint will be included in the backup.
{scope,local} option will
cause the
mnesia:backup_checkpoint(Name,Opaque,Args)
function to simply ignore tables on remote nodes. The
scope argument defaults to global.
{tables,TabList}
option will cause the backup functions to simply
ignore all other tables than the ones included in the
TabList.
mnesia_backup
callback module, the option {module,Mod} is
used.
ram_overrides_dump option to
mnesia:activate_checkpoint has been extended to
also allow an explicit list of tables which should
have the ram_overrides_dump semantics.
mnesia:del_table_copy(schema, Node) now
completly removes the reference to the node Node
when the node is down. All tables which only reside on
that node will be removed.
mnesia:change_config(extra_db_nodes, NodeList),
after mnesia is started.
It can be called from a node which uses disc schema to
connect to new and empty ram nodes.
Or it can be called from the new ram node to connect to an
already existing mnesia cluster.
ordered_set is now supported for
ram_copies and disc_copies tables if it is
supported by the Erlang runtime system,
i.e. OTP R5 or later.
mnesia:create_schema/1 created a temporary file on
the current directory. This turned out to be not so
splendid, especially if no write access was granted to
the current directory. Now the temporary file is created
on the Mnesia directory.
mnesia:restore/2 did not work if someone had subscribed
to a table involved in the restore.
mnesia:transform_table/3 has been made more efficient,
it still uses alot memory due to the fact that all records has
to be logged to disk as a single transaction.
Mnesia cannot be upgraded on the fly, it must be
restarted with the new code, due to protocol changes.
mnesia node at the
time. New functionality will not work until all nodes have been upgraded.
auto_repair is set to true (default).
If auto_repair is set to false mnesia will generate a fatal
event and terminate.
mnesia:del_table_copy(schema, Node) will only
work if and only if mnesia on the node Node is
NOT running. Before
mnesia:del_table_copy(schema, Node) would only work
if the node was running. This behavior made it impossible
to remove a mnesia node when the hardware was
malfunctioning.
None.