aboutsummaryrefslogtreecommitdiffstats
path: root/lib/mnesia/src
AgeCommit message (Collapse)Author
2012-03-26Merge branch 'ud/fix-return-do_get_disc_copy2' into maintGustav Simonsson
* ud/fix-return-do_get_disc_copy2: Fixes value returned by mnesia_loader:do_get_disc_copy2/4 OTP-10015 OTP-10016
2012-01-31[Mnesia] More optimizationsDan Gudmundsson
If a transaction releases a write, it can be deleted directly since no read locks or other write locks can be present
2012-01-31[Mnesia] Optimize double ets_lookupsDan Gudmundsson
2012-01-31[Mnesia] Optimize for lookup instead of match_objectDan Gudmundsson
5% faster on tpcb
2012-01-31[Mnesia] First try with ordered_set instead of bagDan Gudmundsson
Switch to ordered_set so match_object matches partially bound keys, more efficient.
2011-12-31Fixes value returned by mnesia_loader:do_get_disc_copy2/4Uwe Dauernheim
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. This patch was stuck as a pull request in GitHub (authored by Uwe Dauernheim): https://github.com/erlang/otp/pull/16
2011-12-09Update copyright yearsBjörn-Egil Dahlberg
2011-12-09Merge branch 'dgud/mnesia/read-sticky-bug/OTP-9786'Dan Gudmundsson
* dgud/mnesia/read-sticky-bug/OTP-9786: [mnesia] Read record from correct node [mnesia] Fixed sticky read lock bug [mnesia] Whitespace fixes Conflicts: lib/mnesia/src/mnesia_log.erl
2011-12-09Merge branch 'rc/mnesia_log-no-async'Henrik Nord
* rc/mnesia_log-no-async: Use the synchronous log_terms instead of alog_terms in mnesia_log:ets2dcd() OTP-9804
2011-12-07Use the synchronous log_terms instead of alog_terms in mnesia_log:ets2dcd()Richard Carlsson
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.
2011-12-07[mnesia] Read record from correct nodeDan Gudmundsson
Read from where_to_read otherwise bad data may read during move_table, where where_to_write is updated before where_to_read and the table is available.
2011-12-06[mnesia] Fixed sticky read lock bugDan Gudmundsson
wread on locks stuck at non-local node could return unexpected value. Thanks to Magnus Henoch who posted a nice testcase showing the bug.
2011-12-06[mnesia] Whitespace fixesDan Gudmundsson
2011-11-28[mnesia] Add possibility for implementation dependent storage options to ↵Dan Gudmundsson
create_table
2011-11-18Merge branch 'pr/mnesia_frag_hash'Henrik Nord
* pr/mnesia_frag_hash: add mnesia_frag_hash test Reduce calls to phash in key_to_frag_number OTP-9722
2011-11-11Merge branch 'maint-r14'Dan Gudmundsson
2011-11-07Prepare releaseDan Gudmundsson
2011-11-07[mnesia] Fix deadlock in aborted mnesia:del_table_copy/2Dan Gudmundsson
2011-11-07[mnesia] Make all schema operations protocol awareDan Gudmundsson
Allow schema operation even if not all nodes are upgraded to latest version.
2011-11-07[mnesia] Remove export of clear_table which is not a schema operation anymoreDan Gudmundsson
2011-11-07[mnesia] Cleanly bring down mnesiaDan Gudmundsson
Aviods failing/wobbling testcase. Mnesia mishandled supervisors.
2011-09-28Merge remote-tracking branch 'upstream/dev' into majorDan Gudmundsson
2011-09-28[mnesia] Prepare releaseDan Gudmundsson
2011-09-21Merge branch 'dev' into majorDan Gudmundsson
2011-09-21Merge branch 'dgud/mnesia/leaking-log/OTP-9551' into devDan Gudmundsson
* dgud/mnesia/leaking-log/OTP-9551: [mnesia] Use api to log decisions.
2011-09-19[mnesia] Use dedicated api for clearing tablesDan Gudmundsson
Mainly to correctly clear dets tables. It may also be faster to use the dedicated functions.
2011-09-19[mnesia] Use api to log decisions.Dan Gudmundsson
Instead of just appending decisions to the log, use mnesia_log:log(Decision), it will increment the counter which causes the log to be dumped even if no actual commits are stored on this node. This fixed a bug where the LATEST.log would grow forever on a node which had the schema on disc, but where not involved in any commits.
2011-09-19Merge branch 'dev' into majorDan Gudmundsson
2011-09-15[mnesia] Fix schema conversion to previous versionsDan Gudmundsson
2011-09-15[mnesia] Whitespace fixesDan Gudmundsson
2011-09-15[mnesia] Update protocol versionDan Gudmundsson
And remove old protocol version hacks
2011-09-15[mnesia] Mnesia schema merge tested with 2 nodes, r13b04 -> r14b (dev)Ulf Wiger
The do_merge_schema function now converts cstructs from a remote node when it detects that they are different. In order to be compatible the other way around, mnesia_controller:get_cstructs() detects a remote caller, and converts the cstructs before sending them.
2011-09-15[mnesia] Fixed bug in aborted schema transactionsDan Gudmundsson
2011-09-15[mnesia] Add hrl dependencyDan Gudmundsson
2011-08-16emulator: Add a fourth element in exception stacktracesBjörn Gustavsson
This commit is a preparation for introducing location information (filename/line number) in stacktraces in exceptions. Currently a stack trace looks like: [{Mod1,Function1,Arity1}, . . . {ModN,FunctionN,ArityN}] Add a forth element to each tuple that can be used indication the filename and line number of the source file: [{Mod1,Function1,Arity1,Location1}, . . . {ModN,FunctionN,ArityN,LocationN}] In this commit, the fourth element will just be an empty list, and we will change all code that look at or manipulate stacktraces.
2011-05-20Update copyright yearsBjörn-Egil Dahlberg
2011-05-17Prepare mnesia releaseDan Gudmundsson
2011-05-17Remove deadcodeDan Gudmundsson
2011-05-17Merge branch 'uw/mnesia-majority' into devHenrik Nord
* uw/mnesia-majority: dialyzer warning on mnesia_tm Add documentation text about majority checking add mnesia_majority_test suite where_to_wlock optimization + change_table_majority/2 bug in mnesia_tm:needs_majority/2 optimize sticky_lock maj. check check majority for sticky locks Write locks now check majority when needed. Add {majority, boolean()} per-table option. OTP-9304
2011-05-16dialyzer warning on mnesia_tmUlf 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-05-12Merge branch 'dgud/mnesia/add_index_crash/OTP-9285' into devDan Gudmundsson
* dgud/mnesia/add_index_crash/OTP-9285: Fix mnesia crash when adding index on non loaded tables.
2011-05-12Use recover_nodes when deciding alive nodesDan Gudmundsson
Fixes timing issue in test cases
2011-05-11Fix mnesia crash when adding index on non loaded tables.Dan Gudmundsson
This could happen on ram_copies tables.
2011-04-27Reduce calls to phash in key_to_frag_numberPhilip Robinson
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.