aboutsummaryrefslogtreecommitdiffstats
path: root/lib/mnesia/src
AgeCommit message (Collapse)Author
2019-08-21Merge branch 'hasse/remove_old_IO_requests/OTP-15695'Hans Bolinder
* hasse/remove_old_IO_requests/OTP-15695: stdlib: Remove old I/O-requests from test suites stdlib (doc): Do not mention old requests snmp: Update old format I/O-request sasl: Use encoding when reading terms parsetools (doc): Update old format I/O-requests mnesia: Update old format I/O-request kernel: Update old format I/O-requests stdlib: Remove no longer used function kernel: Remove commented out code stdlib: Remove commented out code
2019-08-20mnesia: Update old format I/O-requestHans Bolinder
2019-08-09Merge branch 'dgud/mnesia/sticky-bug/ERL-768/OTP-15979' into maintDan Gudmundsson
* dgud/mnesia/sticky-bug/ERL-768/OTP-15979: mnesia: Bump protocol version mnesia: Introduce sync_asym_trans protocol
2019-07-25mnesia: Bump protocol versionDan Gudmundsson
Remove unsupported conversions from the old protocols. This means mnesia on OTP-R18 nodes is no longer able to connect to OTP-22 mnesia nodes. Add protocol conversion for old nodes and sync_asym_trans transactions.
2019-07-25mnesia: Introduce sync_asym_trans protocolDan Gudmundsson
Transactions with sticky locks could with async_asym transactions be committed in the wrong order, since asym transaction are spawned on the remote nodes. See ERL-768.
2019-06-28mnesia: Fix deadlock caused by add_table_copyDan Gudmundsson
If add_table_copy was called when a node was starting it deadlock waiting for mnesia_controller, when schema was not merged. Abort if that is the case.
2019-05-07Report stacktrace in non-transactions activity function errors.Daniil Fedotov
If an activity function fails with an error, the stacktrace is dropped in non_transaction function try/catch clause. This makes debuging of errors inside a transaction really hard. Transaction activities handle errors and exits differently, non-transaction activities should do the same. Adding the stacktrace to the exit reason when translating errors to exits.
2019-03-20Fix erroneous aborts when using index plugins (ERL-556)Ulf Wiger
- first stab at fixing index_[read|match_object] w plugins - do not include index plugins at match ops - add index_plugin_test_suite - Increase ix plugin test coverage + bug fix
2019-02-25Merge branch 'maint'Dan Gudmundsson
* maint: mnesia: Avoid raise in overload reports
2019-02-22mnesia: Avoid raise in overload reportsDan Gudmundsson
Several processes could invoke adjust_log_writes, which could cause overload reports.
2019-02-18Merge pull request #2102 from dszoboszlay/optimise-ext-table-dumping-furtherDan Gudmundsson
Optimise ext table dumping OTP-15588
2019-01-22Optimise ext table dumpingDániel Szoboszlay
The original algorithm first grouped ops in a commit by ext engine type via folding over the list with orddict:append/3, that resulted in an O(n^2) algorithm. However, grouping the ops is not needed, the ops can be dispatched to insert_op/6 one-by-one, after looking up the storage semantics of their respective engine. This is a much cheaper algorithm, assuming looking up the storage semantics is cheap (which should be).
2018-11-29Fall back to default locking if LockKind is not read or writeMagnus Fröberg
2018-11-22Mnesia should always use the local context if availableMagnus Fröberg
Do not read from (set | order_set) source table if the content is already in the transactional context (i.e., a previous write/delete).
2018-08-23Merge branch 'maint'Lars Thorsen
* maint: Updated OTP version Prepare release Updated the engine load functionality Clean up bag index tables
2018-08-23Merge branch 'maint-20' into maintLars Thorsen
* maint-20: Updated OTP version Prepare release Updated the engine load functionality Clean up bag index tables Conflicts: OTP_VERSION lib/crypto/c_src/crypto.c lib/crypto/doc/src/notes.xml lib/crypto/vsn.mk lib/mnesia/doc/src/notes.xml lib/mnesia/vsn.mk otp_versions.table
2018-08-17Clean up bag index tablesDan Gudmundsson
Index records for bag tables with ram_copies was not deleted after "real" objects where deleted and thus a memory leak.
2018-08-13Merge branch 'maint'Dan Gudmundsson
* maint: Fix delete_object and write convergence in transaction. Replace for loop with strchr Fix typos Clean unused wxe_driver callbacks Remove wx c_src compilation warning on Darwin
2018-08-13Merge remote-tracking branch 'upstream/pr/1858' into maintDan Gudmundsson
* upstream/pr/1858: Fix delete_object and write convergence in transaction. OTP-15231
2018-08-10Merge branch 'maint'Rickard Green
* maint: Updated OTP version Update release notes Update version numbers crypto: Fix crash in compute_key(ecdh, ...) on badarg Relax add_table_copy restriction Fixed #Ref ordering bug Test #Ref ordering in lists and ets Do NOT disc_load from ram_copies when master_node is set ssl: Make sure that a correct cipher suite is selected ssl: Correct handling of empty server SNI extension
2018-08-10Merge branch 'maint-20' into maintRickard Green
* maint-20: Updated OTP version Update release notes Update version numbers crypto: Fix crash in compute_key(ecdh, ...) on badarg Relax add_table_copy restriction Fixed #Ref ordering bug Test #Ref ordering in lists and ets Do NOT disc_load from ram_copies when master_node is set ssl: Make sure that a correct cipher suite is selected ssl: Correct handling of empty server SNI extension
2018-08-09Merge branch 'dgud/mnesia/add_table_copy_ram/OTP-15226' into maint-20Erlang/OTP
* dgud/mnesia/add_table_copy_ram/OTP-15226: Relax add_table_copy restriction
2018-08-09Relax add_table_copy restrictionDan Gudmundsson
Allow to add replicas even if all other replicas are down when the other replicase are not stored on disk.
2018-08-08Do NOT disc_load from ram_copies when master_node is setDan Gudmundsson
Setting master_nodes to a node with ram_copies replica and that node had not loaded the table, could cause it load an empty table, even though (non master) nodes had disc_replicas. This meant that tables where unexpected empty after multiple failures happened. When this happen do not load the table and wait for user to force_load it on some node, preferably with a disk copy.
2018-07-27Change "can not" into "cannot"Raimo Niskanen
I did not find any legitimate use of "can not", however skipped changing e.g RFCs archived in the source tree.
2018-07-19add more specific type spec for mnesia:change_configFerenc Böröczki
2018-07-18fix return type of mnesia:change_configFerenc Böröczki
2018-07-03Fix delete_object and write convergence in transaction.Daniil Fedotov
Fix a bug, when delete_object was deleting the record if it was written in the same transaction even if it was written to a different value. To verify: %% Create a set table mnesia:create_table(foo, []). %% Write and delete_object in transaction mnesia:transaction(fun() -> mnesia:write({foo, bar, one}), mnesia:delete_object({foo, bar, not_one}) end). {atomic, [{foo, bar, one}]} = mnesia:transaction(fun() -> mnesia:read(foo, bar) end). Added a section to isolation tests to check for non-matching delete_object requests.
2018-06-18Update copyright yearHenrik Nord
2018-03-16mikpe/process_info-1-no-messages/PR-1745/OTP-14986Lukas Larsson
make erlang:process_info/1 not retrieve messages
2018-03-10make erlang:process_info/1 not retrieve messagesMikael Pettersson
process_info/1 retrieves a number of properties related to a process, including the list of messages in its mailbox. This is potentially unsafe if the target process has a large number of queued messages: - there is no a priori upper bound on the amount of memory being allocated to hold that list, and - the loop to retrieve the messages is uninterruptible, so the Erlang scheduler where this executes blocks for the duration We've seen process_info/1 bring down heavily loaded nodes on more than one occasion. At least once it appeared to have blocked the Erlang heart process from executing, causing the external heart to kill the VM. Consequently this removes 'messages' from the list of process_info tags to retrieve for process_info/1. Note that process_info/1 still retrieves 'message_queue_len', and process_info/2 can still retrieve 'messages' when asked to. A few places in the OTP libraries need minor adjustments, since they want 'message_queue_len' but compute it from the length of the list of messages.
2018-02-06mnesia: Do not call erlang:get_stacktrace() (cont)Hans Bolinder
Take care of the call of erlang:get_stacktrace() in module mnesia_lib.
2018-02-06mnesia: Do not call erlang:get_stacktrace()Hans Bolinder
The remaining call (in module mnesia_lib) is taken care of in the following commit.
2017-12-19Merge branch 'maint'Dan Gudmundsson
* maint: Updated OTP version Prepare release mnesia: Fix checkpoint crash
2017-12-18Merge branch 'dgud/mnesia/checkpoint-crash/OTP-14841' into maint-20Erlang/OTP
* dgud/mnesia/checkpoint-crash/OTP-14841: mnesia: Fix checkpoint crash
2017-12-18Merge branch 'dgud/mnesia/slow-startup/OTP-14829' into maint-20Erlang/OTP
* dgud/mnesia/slow-startup/OTP-14829: mnesia: Read schema user properties directly
2017-12-18mnesia: Fix checkpoint crashDan Gudmundsson
Bad timing can cause retain messages to go to a new process if checkpoint name is reused directly and the checkpoints contain different tables. Ignore those messages instead of crash.
2017-12-18Merge branch 'maint'Dan Gudmundsson
* maint: Updated OTP version Prepare release mnesia: Read schema user properties directly ssh: testcases for space trailing Hello msg ssh: Don't remove trailing WS in Hello msg
2017-12-18Merge branch 'maint-19' into maintDan Gudmundsson
* maint-19: Updated OTP version Prepare release mnesia: Read schema user properties directly ssh: testcases for space trailing Hello msg ssh: Don't remove trailing WS in Hello msg
2017-12-15Merge branch 'dgud/mnesia/slow-startup/OTP-14829' into maint-19Erlang/OTP
* dgud/mnesia/slow-startup/OTP-14829: mnesia: Read schema user properties directly
2017-12-14mnesia: Read schema user properties directlyDan Gudmundsson
Doing a proper transaction handling of user properties (in current implmenentation) caused schema_transactions to be quadratic which caused huge startup times for nodes with many tables since the merge schema is a schema_transaction. Do a direct read instead, cheap but implies that the plugin changes will not be visible until the changes are commited and cannot be used later in same transaction, which was possible before if undocumented functions where used.
2017-12-04Merge branch 'maint'Dan Gudmundsson
* maint: mnesia: Fix error handling in abort write
2017-12-04Merge branch 'dgud/mnesia/backup-error-handling/OTP-14776' into maintDan Gudmundsson
* dgud/mnesia/backup-error-handling/OTP-14776: mnesia: Fix error handling in abort write
2017-11-30Merge branch 'maint'Dan Gudmundsson
* maint: Fix type create_option() in mnesia
2017-11-27Fix type create_option() in mnesiaAndras Boroska
The create_option() type in mnesia lacks the user_properties field which is used by mnesia in various places.
2017-11-14Add ignore option to transform_table fun (#1614)Bernard Duggan
2017-11-14mnesia: Fix error handling in abort writeDan Gudmundsson
The "root cause" error reason was lost when abort_write failed, e.g. file was already closed, and Mod:abort_write(..) returned an error.
2017-09-19Update runtime deps to depend on new stdlib functionalityDan Gudmundsson
~tw and new string functions are new since OTP-20 (stdlib-3.4)
2017-09-05mnesia: Improve handling of UnicodeHans Bolinder
2017-06-14Update copyright yearHans Nilsson