aboutsummaryrefslogtreecommitdiffstats
path: root/lib/mnesia/src/mnesia_lib.erl
diff options
context:
space:
mode:
authorUlf Wiger <[email protected]>2010-12-09 15:08:52 +0100
committerHenrik Nord <[email protected]>2011-05-16 11:00:28 +0200
commit6d446fc5d08d56174a79ab546d5aa2e79277af06 (patch)
treeabfde5ca53f3fdf657df524b4bdb03791aaf9bbb /lib/mnesia/src/mnesia_lib.erl
parente3af9123e7ef9291535cafbd0ecb9d3309d674f7 (diff)
downloadotp-6d446fc5d08d56174a79ab546d5aa2e79277af06.tar.gz
otp-6d446fc5d08d56174a79ab546d5aa2e79277af06.tar.bz2
otp-6d446fc5d08d56174a79ab546d5aa2e79277af06.zip
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 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.
Diffstat (limited to 'lib/mnesia/src/mnesia_lib.erl')
0 files changed, 0 insertions, 0 deletions