summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Set `couchTests.elixir = true` to skip ported testsfix-view-errors-js-testPaul J. Davis2020-01-064-4/+4
| | | | | | This avoids the 1.2s pause between tests to save time during the test suite. All ported tests are also logged to measure our progress porting the JS test suite.
* Fix JS tests on SpiderMonkey 60Paul J. Davis2020-01-064-2/+54
| | | | | | | It turns out the infinite loop can now run fast enough that we exhaust the stack space in a given couchjs process. This ends up leaving a couchjs process that can't be used for other things as the `map_results` buffer doesn't get reset inbetween calls.
* Fix SM60 build on Mac (#2401)Jan Lehnardt2020-01-062-3/+5
| | | | | | * fix: avoid segfaults, patch by @davisp * fix: build against sm60 on mac needs extra compiler flags
* feat: add read-only _metrics role for _stats and _system endpoints (#2392)Jan Lehnardt2020-01-062-5/+21
| | | Closes #1567
* Set a high priority on couch_serverPaul J. Davis2020-01-053-0/+17
| | | | | | | | | | In a VM with lots of processes couch_server can end up slowing down purely to not being scheduled which in turn will cause its message queue to backup. We've attempted this before but due to message passing have never seen it have a significant effect. However, now that we're actively avoiding synchronous message passing inside the man loop this has a significant effect by being able to process messages as soon as it has one in its mailbox.
* Move more work out of couch_server's main loopPaul J. Davis2020-01-051-59/+92
| | | | | | | This moves the database name check and engine lookup into the open_async process. There's no reason that this work had to happen in the main loop so we can easily move the regex and engine lookups out of the loop to minimize the work per handle_call even further.
* Track db open times in the async_open pidPaul J. Davis2020-01-051-14/+19
| | | | | We can track the open latencies from the async_open process so that couch_server does not have to perform the update in its main loop.
* Reduce logging calls in couch_serverPaul J. Davis2020-01-051-4/+15
| | | | | Even when disabled these logs can take a non-trivial amount of reductions which can add extra suspensions to couch_server's main loop.
* Avoid file_server_2 for existance testsPaul J. Davis2020-01-051-2/+11
| | | | | Its not uncommon to have file_server_2 behaving poorly so we'll avoid it when there are calls that are made often.
* Simplfiy interleaved message couch_server testPaul J. Davis2020-01-051-33/+17
| | | | | | | Previous this test relied on delete/open requests getting things into a confused state. Now that we understand the issue we can replace the more complicated logic by directly polutnig couch_server's message queue with invalid messages.
* Feat/1752/setup UUID and auth secret (#2398)Jan Lehnardt2020-01-052-3/+26
| | | | | | | | * reafactor: generalise sync_admin to sync_config * feat: sync cluster UUID and http auth secret on setup Closes #1752
* a systemd-journald compatible log output on stderr (#1912)Дамјан Георгиевски2020-01-052-4/+82
| | | | | | | | | | * a systemd-journald compatible log output on stderr based on the stderr logger but changed: - doesn't output the timestamp, the journal already has a timestamp - output the log level as <num> where num is defined as in `sd-daemon(3)` https://www.freedesktop.org/software/systemd/man/sd-daemon.html
* Fix/1977 (#2296)Grzegorz Abramczyk2020-01-055-1/+51
| | | | | | | | | | | | | | | | * Added db initialization for standalone instance * Test setup * Updated readme * Added standalone option to rel/overlay/etc/default.ini * Simplified test setup * s/standalone/single_node/ Co-authored-by: Jan Lehnardt <jan@apache.org>
* feat: add metric counter for unindexed mango queries. Closes #1913 (#2390)Jan Lehnardt2020-01-052-0/+5
|
* Lock shard splitting targets during the initial copy phaseNick Vatamaniuc2020-01-055-8/+141
| | | | | | | | | | | | | | | During the initial copy phase target shards are opened outside the couch_server. Previously, it was possible to manually (via remsh for instance) open the same targets via the couch_server by using the `couch_db:open/2` API for example. That could lead to corruption as there would be two writers for the same DB file. In order to prevent such a scenario, introduce a mechanism for the shard splitter to lock the target shards such that any regular open call would fail during the initial copy phase. The locking mechanism is generic and would allow local locking of shards for possibly other reasons in the future as well.
* Blacklist all 21.x releases older than 21.2.3 (#2056)Paul J. Davis2020-01-041-1/+1
| | | | | | | | This basically just extends the black list to cover the `21.{0,1}` release range. This is due to a compiler bug [1] which is a duplicate of [2]. [1] https://bugs.erlang.org/browse/ERL-981 [2] https://bugs.erlang.org/browse/ERL-807
* Feature/user db security obj readonly (#2395)Jan Lehnardt2020-01-044-5/+53
| | | | | | | | | | | | * Allow to set the user db security object to readonly - Add the default config - Deny update on _security if the database is the user db and if the config is to false - Add unit test * Allow edits on _users security for the JS test Co-authored-by: Alexis Côté <popojargo@users.noreply.github.com>
* removed useless configfile section (#1967)Alessandro Ogier2020-01-040-0/+0
|
* Multi/elixir 3 (#2394)Jan Lehnardt2020-01-0463-67/+1142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add auth cache test into elixir test suite * Port cookie_auth test suite into elixir * Remove conflicting functions * remove debug log level config * Port users_db from js test suite to elixir * WIP: make test more robust * WIP: increase default timeout, revert to fail when login error * Auth cache test fixes * Cookie auth test fixes * Cookie auth test fixes * Correct test name * Correct test name * Disable all JS tests that have Elixir test counterparts. * Convert test setup/teardown logic into idiomatic ExUnit and use @moduletag config * Disable auth_cache_test * auth cache test is disabled * Update elixir test suite README.md with missing ported stuff * Port UTF8 js test suite to elixir * fix: losen assertion * disable more JS tests Co-authored-by: Juanjo Rodriguez <jjrodrig@gmail.com> Co-authored-by: Alessio Biancalana <dottorblaster@gmail.com>
* Autoupdate false test (#2311)Robert Newson2020-01-042-2/+33
| | | | | | | * restore tests removed in 0a85b75ee150 * disable autoupdate when testing for stale indexes
* Fixes #2151 - start CouchDB from symlinks (#2152)Ronny2020-01-042-2/+22
|
* Port erlang views tests into elixir test suite (#2237)Juanjo Rodriguez2020-01-044-3/+120
| | | | | | | | | * Port erlang views tests into elixir test suite * Enable erlang views in elixir testing * Support nil or :null in response
* Fix some typos in the bug report issue template (#2233)Bessenyei Balázs Donát2020-01-041-4/+4
| | | | * Fix some typos in the bug report issue template
* Refuse startup with no server admin set up (#2389)Jan Lehnardt2020-01-044-70/+87
| | | | | | | | | | | | feat: refuse startup with no server admin set up includes an admin party assert escape hatch for tests adds a log message every 5 minutes, if escape hatch is enabled. should play nice with systemd restart policies Co-authored-by: Joan Touzet <wohali@users.noreply.github.com>
* feat: add "access-ready" to feature flags in welcome messageJan Lehnardt2020-01-041-0/+3
|
* feat: allow special document member _accessJan Lehnardt2020-01-042-3/+7
| | | | | | | | | | | | | | | | | This is in preparation for per-document access control which is going to use this field. We are adding this in 3.0 because per- document access control will not be ready for 3.0, but added in 3.1 or later. This commit allows a future version of CouchDB with per-document access control to replicate with CouchDB 3.0, to make upgrades and interoperability easy. The per-documnet access control code is not going to store the _access property in the document body like this patch does, but is going to store it in an extra field inside of #doc and assert access control for a document without having to load the entire document body.
* test: add failing test for _access preparation commitJan Lehnardt2020-01-041-1/+11
|
* Fix double "make clean"Joan Touzet2019-12-311-1/+3
| | | | | | | This is a recurrence of #1450 caused by ec416c3 (SpiderMonkey 60 PR), where a case clause in rebar.config.script lacks a match when configure has not yet been run yet.
* Speedup eunit: smoosh_serverPaul J. Davis2019-12-251-18/+27
|
* Speedup eunit: mem3_sync_event_listenerPaul J. Davis2019-12-251-18/+35
|
* Speedup eunit: mem3_shardsPaul J. Davis2019-12-251-18/+36
|
* Speedup eunit: mem3_repPaul J. Davis2019-12-251-1/+1
|
* Speedup eunit: mango_idx_testPaul J. Davis2019-12-251-17/+30
|
* Speedup eunit: fabric_doc_updatePaul J. Davis2019-12-251-19/+34
|
* Speedup eunit: fabric_doc_purgePaul J. Davis2019-12-251-2/+1
|
* Speedup eunit: fabric_doc_openPaul J. Davis2019-12-251-23/+38
|
* Speedup eunit: fabric_db_createPaul J. Davis2019-12-251-14/+25
|
* Speedup eunit: ddoc_cache_no_cache_testPaul J. Davis2019-12-251-3/+13
|
* Speedup eunit: couch_replicator_schedulerPaul J. Davis2019-12-251-38/+55
|
* Speedup eunit: couch_replicator_clusteringPaul J. Davis2019-12-251-11/+28
|
* Speedup eunit: couch_replicator_auth_sessionPaul J. Davis2019-12-251-20/+37
|
* Speedup eunit: couch_replicatorPaul J. Davis2019-12-251-4/+6
|
* Speedup eunit: couch_mrview_purge_docs_fabric_testsPaul J. Davis2019-12-251-4/+14
|
* Speedup eunit: couch_mrview_compactorPaul J. Davis2019-12-251-19/+22
|
* Speedup eunit: couch_index_compaction_testsPaul J. Davis2019-12-251-4/+15
|
* Speedup eunit: couch_indexPaul J. Davis2019-12-251-6/+15
|
* Speedup eunit: couchdb_mrview_testsPaul J. Davis2019-12-251-11/+20
|
* Speedup eunit: couch_uuids_testsPaul J. Davis2019-12-251-98/+68
| | | | | Avoid `test_util:start/3` as it wastes time mocking modules for each test.
* Speedup eunit: couch_flags_config_testsPaul J. Davis2019-12-251-4/+7
| | | | | This undoes the test per combination approach to avoid the time spent printing each name to the console.
* Speedup eunit: couch_file_testsPaul J. Davis2019-12-251-74/+92
|