aboutsummaryrefslogtreecommitdiffstats
path: root/lib/mnesia
AgeCommit message (Collapse)Author
2011-05-16Add documentation text about majority checkingUlf Wiger
2011-05-16add mnesia_majority_test suiteUlf Wiger
2011-05-16where_to_wlock optimization + change_table_majority/2Ulf Wiger
2011-05-16bug in mnesia_tm:needs_majority/2Ulf Wiger
2011-05-16optimize sticky_lock maj. checkUlf Wiger
2011-05-16check majority for sticky locksUlf 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-04-07Merge branch 'maint-r14' into devNiclas Eklund
2011-04-04Update release notesErlang/OTP
2011-04-04Prepare releaseDan Gudmundsson
2011-04-04Mnesia sometimes failed to tell all nodes that it had started.Dan Gudmundsson
2011-03-30Merge branch 'hw/call-chmod-without-f' into devHenrik Nord
* hw/call-chmod-without-f: Call chmod without the "-f" flag Conflicts: erts/emulator/test/Makefile lib/asn1/test/Makefile lib/crypto/test/Makefile lib/debugger/test/Makefile lib/docbuilder/test/Makefile lib/edoc/test/Makefile lib/erl_interface/test/Makefile lib/inviso/test/Makefile lib/parsetools/test/Makefile lib/percept/test/Makefile lib/ssl/test/Makefile lib/syntax_tools/test/Makefile lib/test_server/test/Makefile lib/tools/test/Makefile OTP-9170
2011-03-14Prepare releaseOTP_R14B02Erlang/OTP
2011-03-11Update copyright yearsBjörn-Egil Dahlberg
2011-03-09Prepare releaseDan Gudmundsson
2011-03-09Applied from mnesia_frag:first patch from Magnus HenochDan Gudmundsson
"When I run mnesia:first on an empty fragmented table, it tries to access the fragment with the number one beyond the maximum. In the sample code below, I create a table with two fragments, 'foo' and 'foo_frag2', but mnesia tries to access 'foo_frag3':"
2011-03-09The number of test nodes where to small for the testsuiteDan Gudmundsson
A miss introduced when converting to common_test
2011-03-09Abort/restart if network has changed, can be a partioned networkDan Gudmundsson
2011-03-07Merge branch 'dgud/dialyzer-fixes' into devDan Gudmundsson
OTP-9107
2011-03-02Remove wrong specDan Gudmundsson
2011-03-02Mnesia dialyzer fixesDan Gudmundsson
With help from Kostis
2011-02-17Rename Suite Callback to Common Test HookLukas Larsson
2011-02-17Update and add cover spec files to work with common_testLukas Larsson
2011-02-17Update all test specsLukas Larsson
2011-02-17Fix formatting for mnesiaLukas Larsson
2011-02-17Add ts_install_scb to suite/0Lukas Larsson
2011-02-17Update mnesia tests to conform with common_test standardLukas Larsson
2011-02-17Update all fin_per_testcase to end_per_testcase.Lukas Larsson
2011-02-17Updated test cases to work with ts conversion algorithmLukas Larsson
2010-12-06Prepare releaseErlang/OTP
2010-12-02Prepare releaseDan Gudmundsson
2010-11-29Created wrong header in dcd files when creating files at startup.Dan Gudmundsson
That caused a 'log_header' entry to added to the disc_copies tables.
2010-11-15Call chmod without the "-f" flagHolger Weiß
"-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.
2010-11-01doc: "works like" instead of "works as" + missing likeBoris 'billiob' Faure
2010-11-01remove '\011' from mnesia docBoris 'billiob' Faure
2010-11-01fix typo in mnesia docBoris 'billiob' Faure
2010-09-15mnesia: Do not auto-import error/2Tuncer Ayaz
Resolve name clash with auto-imported BIF error/2.
2010-09-13Prepare releaseOTP_R14BErlang/OTP
2010-09-10Remove warnings for clashes with new autoimported BIFsPatrik Nyblom
2010-09-07Merge branch 'mk/net-dragonfly-bsd-patches' into devBjörn Gustavsson
* mk/net-dragonfly-bsd-patches: Remove unused variables Use proper install method Add support for DragonFly BSD Add support for NetBSD
2010-08-18Remove ticket numbers from all vsn.mk filesBjörn Gustavsson
Some application's vsn.mk files contained a list of the ticket numbers fixed in each version. Since that information can be obtained from the notes.xml file or from the merge commits in the git repository (provided that the branch name includes the ticket number), there is no reason to manually maintain that information in the vsn.mk files.
2010-08-13Use proper install methodMartti Kuparinen
Only real program files should be installed with INSTALL_PROGRAM while scripts should be installed with INSTALL_SCRIPT and data files with INSTALL_DATA.
2010-06-09Prepare ReleaseDan Gudmundsson
2010-06-08Release mnesia testsDan Gudmundsson
2010-06-07CleanupDan Gudmundsson
2010-06-04Merge branch 'uw/mnesia-overload' into devErlang/OTP
* uw/mnesia-overload: Enable continuous monitoring of mnesia overload status
2010-06-04Merge branch 'uw/mnesia-schema-merge' into devErlang/OTP
* uw/mnesia-schema-merge: remove debug printout and accidental variable name reuse Allow a user_defined function to wrap mnesia_schema:merge_schema()
2010-06-02remove debug printout and accidental variable name reuseUlf Wiger
2010-06-02Allow a user_defined function to wrap mnesia_schema:merge_schema()Ulf Wiger
Mnesia currently notifies the user if it detects a partitioned network, but the options for resolving the situation are limited. In practice, the only safe options are: - set master_nodes and restart one of the affected 'islands' - restart the entire system from backup This patch introduces a way to resolve the situation without restarting any nodes. The key to doing this safely is to lock affected tables and run the merge function inside the same transaction that merges the schema. Otherwise, one transaction will merge the schema, after which writes to the database will be replicated across the (potentially) inconsistent copies; the transaction triggered by the asynchronous inconsistency event will have to race to be the first to access the tables. The normal call to merge the schema is done from mnesia_controller. Previously, this was mnesia_schema:merge_schema(). The new function is merge_schema(UserFun), with the following behaviour: merge_schema(UserFun) -> schema_transaction( fun() -> UserFun(fun(Arg) -> do_merge_schema(Arg) end) end). Where do_merge_schema(LockTabs) will execute the schema merge as before, but also lock all tables in the list LockTabs which have copies on the affected nodes (that is, everywhere the schema table is locked). The effect of this is to allow a wrapper function that calls the merge and, if successful, continues to resolve the inconsistency on the tables, knowing that they have now been locked on all affected nodes. The function that is actually called by the deconflict function is mnesia_controller:connect_nodes(Nodes, UserFun), as in: Tables = tables_to_deconflict(Node), mnesia_controller:connect_nodes( [Node], fun(MergeF) -> case MergeF(Tables) of {merged,_,_} -> deconflict(Tables, Node); Other -> Other end). In the case where the merge fails, it is probably wise to restart from a backup... I have not run the mnesia test suite, as it is not available. I have not updated documentation, as these functions are not documented in the first place.