aboutsummaryrefslogtreecommitdiffstats
path: root/lib/mnesia/src
AgeCommit message (Collapse)Author
2013-11-29mnesia: Fix dirty_update bug when subscriber existsDan Gudmundsson
dirty_update_counter returned the wrong value when a subscriber existed and no events was sent. Thanks Anton Ryabkov.
2013-11-25mnesia: Synchronize lock cleanup after mnesia downDan Gudmundsson
Bad timing could lead to hanging transactions after a mnesia down from a node with sticky locks. Excellent bug report from janchochol Situation: * node A and B have copies of table T * node A ows sticky of table T * node A goes down (e.g. crash) * node B tries to perform transactional operation on table T (e.g. mnesia:select) In this situation there is possibility that first (and maybe other) transaction on node B will hang indefinitely. This is caused by race condition, when transaction process send lock request operation to node A and waits for reply. When node A is down it will never send reply, so process on node B will be stuck forever. Reason is that message sent to mnesia_locker gen_server from mnesia_locker:mnesia_down can be received after mnesia_locker gen_server already replies to transaction processes with {switch, N, Req} and node N is down. Monitoring remote process when sending request to other node should be safe solution.
2013-08-29mnesia: Checkpoint fixDan Gudmundsson
Avoid hanging waiting for other processes on other node to commit.
2013-08-29mnesia: Improve checkpoint activationDan Gudmundsson
Fixed a race where some parts of a transaction could be added to the checkpoint. There are probably more races here but this improves the current testcases.
2013-08-29mnesia: Cleanup and remove obsolete codeDan Gudmundsson
We don't support communicating with such old nodes anyway.
2013-08-16mnesia: fix removal of bup file if not mnesia is startedFredrik Gustafsson
2013-06-12Update copyright yearsBjörn-Egil Dahlberg
2013-06-04mnesia: Fix unsubscribe error handlingDan Gudmundsson
2013-05-17Merge branch 'nm/mnesia_idx_insert_speedup/OTP-11103' into maintFredrik Gustafsson
* nm/mnesia_idx_insert_speedup/OTP-11103: Fix missing case clause for ordered_set tables Optimize index creation for Mnesia set tables
2013-04-24Fix missing case clause for ordered_set tablesNick Marino
The previous commit contained a regression that would trigger a crash when attempting to add an index to an Mnesia table of type ordered_set.
2013-04-12Optimize index creation for Mnesia set tablesNick Marino
ETS bag tables have very poor performance on insertion if you have lots of rows with duplicate keys, since it has to check each existing record and make sure it's not inserting any duplicates. This can lead to some pretty drastic slowdowns when inserting lots of rows into an Mnesia table, IF you're introducing lots of duplicate values into an indexed column. As it turns out, we can fix this by switching to duplicate_bag tables for storing Mnesia indexes on tables of type 'set', and it ultimately makes no functional difference since we will never actually attempt to insert any duplicate records anyway. (We would have to make some bigger changes to make this work for Mnesia bag tables though, so that is left as a possible enhancement for the future.)
2013-04-11mnesia: Fixed bad data in tableDan Gudmundsson
If mnesia:cleartable/1 was called during a table_load an schema event with delete and write of that table is sent, which caused the table to contain the schema record instead of clearing the table.
2013-01-25Update copyright yearsBjörn-Egil Dahlberg
2013-01-23Turn warnings to errors on selected applicationsBjörn Gustavsson
2013-01-22Merge branch 'lh/forget-mnemosyne/OTP-10729'Fredrik Gustafsson
* lh/forget-mnemosyne/OTP-10729: Remove what remains of the Mnemosyne code Remove support for the query keyword and query expressions
2013-01-18Merge branch 'nox/enable-silent-rules/OTP-10726'Björn-Egil Dahlberg
* nox/enable-silent-rules/OTP-10726: Implement ./otp_build configure --enable-silent-rules
2013-01-16Remove what remains of the Mnemosyne codeLoïc Hoguin
2013-01-15Implement ./otp_build configure --enable-silent-rulesAnthony Ramine
With silent rules, the output of make is less verbose and compilation warnings are easier to spot. Silent rules are disabled by default and can be disabled or enabled at will by make V=0 and make V=1.
2013-01-09Prepare OTP files for Unicode as default encodingHans Bolinder
2012-12-13Merge branch 'ao/fix_mnesia_overload_msg_format'Henrik Nord
* ao/fix_mnesia_overload_msg_format: Fix format of mnesia overload message OTP-10639
2012-10-11Fix format of mnesia overload messageAhmed Omar
Using ~p in mnesia overload message could lead to wrong messages. mnesia_tm overload message contains a list of two numbers (queue length) example: instead of: Mnesia is overloaded: {mnesia_tm,message_queue_len,[100,105]} it prints : Mnesia is overloaded: {mnesia_tm,message_queue_len,"di"} Replacing ~p with ~w fixes the problem as it doesn't try to detect lists of printable characters
2012-10-01mnesia: Use chained send_after instead of send_intervalJames Wheare
timer:send_interval behaves badly when resuming from sleep on some platforms. For example, if I sleep for 10 minutes, and have a send_interval running once per minute, when I resume, 10 messages will be sent immediately, eliminating the benefit of only running the work periodically. This is admittedly a separate bug with send_interval, but the workaround is straightforward, and also protects from messages piling up in the queue when the work takes longer than the interval. This patch fixes piled up error reports on resume from sleep: ** WARNING ** Mnesia is overloaded: {dump_log, write_threshold} You'll still be warned if mnesia is overloaded, just not repeatedly. Additionally, erlang:send_after is more efficient than using the timer module equivalent [1] [1] http://www.erlang.org/doc/efficiency_guide/commoncaveats.html#id57251
2012-08-31Update copyright yearsBjörn-Egil Dahlberg
2012-08-27Bumped version nrFredrik Gustafsson
2012-06-18Prevent index from being corrupted if a nonexistent item is deletedBartlomiej Puzon
We have to ensure that we actually delete the last object with a given (key, index) pair before removing the index.
2012-06-05Update to work with whitespace in exec pathLukas Larsson
OTP-10106 OTP-10107
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