aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test/ets_SUITE.erl
AgeCommit message (Collapse)Author
2018-10-09Merge branch 'sverker/erts/ets-select_replace-bug/OTP-15346' into maintSverker Eriksson
* sverker/erts/ets-select_replace-bug/OTP-15346: erts: Fix bug in ets:select_replace for bound key
2018-10-09erts: Fix bug in ets:select_replace for bound keySverker Eriksson
which may cause following calls to ets:next or ets:prev to fail.
2018-09-03erts: Fix ets memstat false leak of FixedDeletionSverker Eriksson
causing erlang:memory to report too much ets memory.
2018-06-18Update copyright yearHenrik Nord
2018-06-04erts: Reduce test log noise from ets_SUITESverker Eriksson
2018-05-08erts: Make atomic ets:delete_all_objects yieldSverker Eriksson
by using a cooperative strategy that will make any process accessing the table execute delelete_all_objects_continue until the table is empty. This is not an optimal solution as concurrent threads will still block on the table lock, but at least thread progress is made.
2018-04-20erts: Use table ref for select continuationSverker Eriksson
and not the name. For more sane named table semantics. Applies to both select/1 continuation and trap context.
2018-03-21Implementation of true asynchronous signaling between processesRickard Green
Communication between Erlang processes has conceptually always been performed through asynchronous signaling. The runtime system implementation has however previously preformed most operation synchronously. In a system with only one true thread of execution, this is not problematic (often the opposite). In a system with multiple threads of execution (as current runtime system implementation with SMP support) it becomes problematic. This since it often involves locking of structures when updating them which in turn cause resource contention. Utilizing true asynchronous communication often avoids these resource contention issues. The case that triggered this change was contention on the link lock due to frequent updates of the monitor trees during communication with a frequently used server. The signal order delivery guarantees of the language makes it hard to change the implementation of only some signals to use true asynchronous signaling. Therefore the implementations of (almost) all signals have been changed. Currently the following signals have been implemented as true asynchronous signals: - Message signals - Exit signals - Monitor signals - Demonitor signals - Monitor triggered signals (DOWN, CHANGE, etc) - Link signals - Unlink signals - Group leader signals All of the above already defined as asynchronous signals in the language. The implementation of messages signals was quite asynchronous to begin with, but had quite strict delivery constraints due to the ordering guarantees of signals between a pair of processes. The previously used message queue partitioned into two halves has been replaced by a more general signal queue partitioned into three parts that service all kinds of signals. More details regarding the signal queue can be found in comments in the erl_proc_sig_queue.h file. The monitor and link implementations have also been completely replaced in order to fit the new asynchronous signaling implementation as good as possible. More details regarding the new monitor and link implementations can be found in the erl_monitor_link.h file.
2018-02-22Add ets:whereis/1 for resolving table names -> tid()John Högberg
2018-02-12Merge 'sverker/maint-20/alloc-n-migration/ERIERL-88'Sverker Eriksson
into 'sverker/master/alloc-n-migration/ERIERL-88'
2018-02-12Merge 'sverker/maint-19/alloc-n-migration/ERIERL-88'Sverker Eriksson
into 'sverker/maint-20/alloc-n-migration/ERIERL-88' OTP-14915 OTP-14916 OTP-14917 OTP-14918
2017-12-20stdlib: Make ets_SUITE memory check try againSverker Eriksson
as memory stats do not guarantee consistency. A typical ETS test case ends by a lot of deallocating that may now trigger homecoming carrier migration, that in turn can cause quite large inconsistencies in memory stats when same carrier is accounted for twice or not at all. And that's my theory why I now sometimes see transient discrepancies between before and after memory stats.
2017-11-17Avoid using the efile driver in test suitesBjörn Gustavsson
The efile driver will soon be reimplemented as a BIF. Instead of opening a port based on efile, use hd(erlang:ports()). It is a reasonable safe assumption that the runtime will continue to use use at least some ports.
2017-11-06Fix typo in test/ets_SUITE.erlDimitris Zorbas
2017-07-17Fix testcases after removal of non-smp emulatorLukas Larsson
2017-05-10Merge branch 'sverker/ets-select-replace-const'Sverker Eriksson
* sverker/ets-select-replace-const: stdlib: Add examples for ets:select_replace docs erts: Fix ets:select_replace with {const, NewTuple}
2017-05-10erts: Fix ets:select_replace with {const, NewTuple}Sverker Eriksson
Enable ets:select_replace to do a generic single object compare-and-swap operation of any ets-tuple using a matchspec like this: [{Old, [], [{const, New}]}] The only exception when this does not work is if the key contains maps or atoms looking like variables (like '$1').
2017-05-04Update copyright yearRaimo Niskanen
2017-04-04stdlib: Limit ets_SUITE:smp_select_replaceSverker Eriksson
to run 3*3 seconds to avoid timeout on slow machines.
2017-04-03stdlib: Skip ets_SUITE:otp_9423 for single sched smpSverker Eriksson
2017-04-03stdlib: Rename ets_SUITE:run_workersSverker Eriksson
run_workers/* -> run_smp_workers/* run_workers_do/4 -> run_sched_workers/4
2017-03-24Fix double hit bug of select/3 with bound keySverker Eriksson
2017-03-22Add more complete key-safety checkSverker Eriksson
2017-03-22Reject unsafe matchspecs on ets:select_replace/2Guilherme Andrade
Preemptively fail operation with badarg if the replacement object might have a different key.
2017-03-22Disable ets:select_replace/2 for bagsGuilherme Andrade
The existing implementation presented both semantic inconsistencies and performance issues.
2017-03-22Add unit tests for ets:select_replace/2Guilherme Andrade
2017-03-22stdlib: Remove ets_SUITE:memory_check_summarySverker Eriksson
and let each test case fail, like it was before. Seems growing/shrinking meta tables was causing the sporadic failed memory checks.
2017-03-22erts: Replace meta_pid_to{_fixed}_tab with linked listsSverker Eriksson
from process psd through all owned/fixed tables. As meta_pid_to{_fixed}_tab maps to slot in meta_main_tab which is planned for destruction. In this commit we no longer seize table lock while freeing the table (free_table_cont) as it's not needed and makes the code a bit simpler. Any concurrent operation on the table will only access lock, owner and status and then bail out.
2017-03-02Implement ets:all() using scheduler specific dataRickard Green
2017-02-10ets_SUITE: Eliminate internal exports used for spawn/applyBjörn Gustavsson
In the future we will run xref to make sure that all functions that are exported are also used. Having internal exports only used for spawning or applying will mess with that.
2016-11-07Merge branch 'maint'Björn-Egil Dahlberg
2016-11-04stdlib: Increase timeouts in ets_SUITEBjörn-Egil Dahlberg
* valgrind needs lots of time
2016-09-29Merge branch 'rickard/time-unit/OTP-13831'Rickard Green
* rickard/time-unit/OTP-13831: Replace usage of deprecated time units
2016-09-19stdlib: Cuddle ets_SUITE for valgrindSverker Eriksson
2016-09-19stdlib: Fix ets_SUITE:smp_select_deleteSverker Eriksson
no point in checking table load as select_delete does not shrink.
2016-09-19erts: Fix ets_SUITE:memorySverker Eriksson
by simply asking for the size of struct ext_segtab
2016-09-19erts: Suppress failed ETS memory checksSverker Eriksson
due to the grow/shrink hysteresis of the meta tables
2016-09-19erts: Reduce ets hash load factorSverker Eriksson
for faster lookup/insert/delete at the expense of about one word per object.
2016-08-25Replace usage of deprecated time unitsRickard Green
2016-07-11erts: Add test ets_SUITE:update_counter_table_growthSverker Eriksson
2016-06-08Revert "erts: Change ETS hash load factor"Sverker Eriksson
This reverts commit 7c133fb1094ad1cabbb5cfc157483a43c816c6a9.
2016-06-08Revert "Temporally disable of failing ets_SUITE:memory_check_summary"Sverker Eriksson
This reverts commit f1987d5299ce67b0eb4c4a83d8ee9bcf7426c307.
2016-06-01Temporally disable of failing ets_SUITE:memory_check_summarySverker Eriksson
Seems to be the growing meta tables that is causing increasing failed memchecks after load factor was lowered.
2016-06-01erts: Change ETS hash load factorSverker Eriksson
from 700% to 200%
2016-05-27stdlib: Fix small inconsistencies in ets_SUITEBjörn-Egil Dahlberg
2016-05-27stdlib: Strengthen or relax test casesBjörn-Egil Dahlberg
In particular, valgrind needs a lot of time for certain tests.
2016-04-13Merge branch 'henrik/update-copyrightyear'Henrik Nord
* henrik/update-copyrightyear: update copyright-year
2016-03-15stdlib: Cuddle with ets_SUITE:evil_renameSverker Eriksson
to make it kill and then wait for all spawned processes to exit.
2016-03-15update copyright-yearHenrik Nord
2016-03-09Eliminate use of ?config() macroBjörn Gustavsson