summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* feat: do not record server admin requests as cache missesfix/1764/admin-cache-missJan Lehnardt2018-11-222-5/+13
| | | | Closes #1746
* Merge pull request #1629 from ↵iilyak2018-11-2213-62/+272
|\ | | | | | | | | cloudant/84736-handle-db-deletion-in-load_validation_funs handle db deletion in load validation funs
| * Handle db deletion in couch_db:load_validation_funsILYA Khlopotov2018-11-2213-62/+272
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously there were quite a few problems with load_validation_funs in the case when clustered database is deleted. - the calls to load_validation_funs were failing with `internal_server` error [1] - the deleted database stayed opened because: - the caller of the load_validation_funs (update_doc) stayed alive - the main_pid of the deleted database wasn't killed either - there was an infinite loop in ddoc_cache_entry trying to recover ddoc from deleted database The solution is: - do not call `recover` for deleted database - close `main_pid` - use `erlang:error` to crash the caller [1] - The stack trace was: ``` {database_does_not_exist,[ {mem3_shards,load_shards_from_db,"bailey/meta",[ {file,"src/mem3_shards.erl"},{line,394}]}, {mem3_shards,load_shards_from_disk,1,[ {file,"src/mem3_shards.erl"},{line,369}]}, {mem3_shards,for_db,2,[ {file,"src/mem3_shards.erl"},{line,54}]}, {fabric_view_all_docs,go,5,[ {file,"src/fabric_view_all_docs.erl"},{line,24}]}, {ddoc_cache_entry_validation_funs,recover,1,[ {file,"src/ddoc_cache_entry_validation_funs.erl"},{line,33}]}, {ddoc_cache_entry,do_open,1,[ {file,"src/ddoc_cache_entry.erl"},{line,294}]}]} ```
* Merge pull request #1744 from cloudant/fix-_design_docs_total_rowsEric Avdey2018-11-219-50/+289
|\ | | | | Fix total_rows value for queries on `_design_docs` handler
| * Add a new test suite for _design_doc handlerEric Avdey2018-11-212-1/+146
| |
| * Remove empty spaces from couch_mrview_test_utilEric Avdey2018-11-211-1/+1
| |
| * Fix misleading assertion in design_docs_query.js testEric Avdey2018-11-211-1/+1
| |
| * Remove ending spaces from design_docs_query.jsEric Avdey2018-11-211-18/+18
| |
| * Fix total_rows for _design_docs with keysEric Avdey2018-11-214-29/+115
| | | | | | | | | | | | This adds a new fabric provider for getting a counter for design docs in a database. It allows for a valid query for total_rows when _design_docs handler queried with an array of keys.
| * Fix total_rows for _design_docs handlerEric Avdey2018-11-212-0/+8
|/
* This adds in downgrade code for Database partitions work. We add anGarren Smith2018-11-213-0/+139
| | | | extra field in the header.
* Merge pull request #1750 from apache/remove-setting-on-chttpd_view_testPeng Hui Jiang2018-11-201-1/+0
|\ | | | | Remove unnecessary setting on chttpd_view_test
| * Remove unnecessary setting on chttpd_view_testremove-setting-on-chttpd_view_testjiangph2018-11-201-1/+0
|/
* Merge pull request #1748 from apache/win-fix-makefileJoan Touzet2018-11-191-0/+1
|\ | | | | Add query server to eunit, Makefile.win
| * Add query server to eunit, Makefile.winwin-fix-makefileJoan Touzet2018-11-191-0/+1
|/
* Set query server env variable in Makefile for isolated eunit tests (#1747)Eric Avdey2018-11-191-0/+1
|
* Merge pull request #1739 from apache/timeout-_purged_infos_limitPeng Hui Jiang2018-11-162-4/+26
|\ | | | | Avoid badmatch when getting fabric timeout
| * Avoid badmatch when getting fabric timeouttimeout-_purged_infos_limitjiangph2018-11-162-4/+26
|/ | | | | | | - Avoid badmatch when putting set_purge_infos_limit and getting fabric timeout COUCHDB-3326
* Merge pull request #1717 from cloudant/COUCHDB-1380-fix-nasty-errorPeng Hui Jiang2018-11-152-3/+7
|\ | | | | Fix nasty 500 error on POST to /_config
| * Fix nasty 500 error on POST to /_configwenwl2018-11-152-3/+7
|/
* Add support for _bulk_get with multipart/mixed and multipart/realated responsesAlexanderKaraberov2018-11-142-13/+412
|
* Merge pull request #1736 from apache/1732-mango-tests-windowsJoan Touzet2018-11-139-18/+40
|\ | | | | Test suite fixes for Windows
| * Revert breaking change to Makefile.winJoan Touzet2018-11-131-4/+10
| |
| * [Win] elixir fix: use 127.0.0.1, not localhostJoan Touzet2018-11-136-12/+16
| | | | | | | | | | | | "It's the test suite, it can't be DNS!" "It's ALWAYS DNS."
| * Mango test suite Windows fixes, closes #1732Joan Touzet2018-11-133-2/+14
|/ | | | | | | | | | | | | | Unfortuantely, os:timestamp() on Windows only has millisecond accuracy. That means that the two Mango tests checking for a positive value of execution_time fail, since these tests appear to be running in <1ms on my test setup (a rather anemic Windows VM!) This change disables only the check for execution_time in two tests, and leaves the remainder of the execution_stats checks in place on Windows. It also introduces a convenience "make.cmd" file so you can "make check" without typing "make -f Makefile.win check" all the time.
* Improve Mango test harness, add Windows compat (#1733)Joan Touzet2018-11-134-55/+50
|
* Merge pull request #1682 from cloudant/feature_flags2iilyak2018-11-137-8/+649
|\ | | | | Feature flags
| * Implement efficient feature flagsILYA Khlopotov2018-11-135-3/+626
| |
| * Fix typespec for couch_epi:get_value/3ILYA Khlopotov2018-11-131-1/+1
| |
| * Emit clauses in the order of definitionsILYA Khlopotov2018-11-131-2/+2
| |
| * Support prefix based matching in couch_epi_data_genILYA Khlopotov2018-11-131-2/+20
|/
* Support elixir 1.7 (#1726)Jay Doane2018-11-123-9/+10
| | | | * Reformat mix.lock * Suppress elixir 1.7 warnings
* [win32] Fix dev/run and Makefile for test suite (#1731)Joan Touzet2018-11-126-11/+61
|
* Remove eliminated config options from testsJay Doane2018-11-121-3/+0
|
* Enable cluster auto-assembly through a seedlist (#1658)Adam Kocoloski2018-11-1010-18/+284
| | | | | | | | | | | | | | | | | | | | | Enable cluster auto-assembly through a seedlist This introduces a new config setting which allows an administrator to configure an initial list of nodes that should be contacted when a node boots up: [cluster] seedlist = couchdb@node1.example.com,couchdb@node2.example.com,couchdb@node3.example.com If configured, CouchDB will add every node in the seedlist to the _nodes DB automatically, which will trigger a distributed Erlang connection and a replication of the internal system databases to the local node. This eliminates the need to explicitly add each node using the HTTP API. We also modify the /_up endpoint to reflect the progress of the initial seeding of the node. If a seedlist is configured the endpoint will return 404 until the local node has updated its local replica of each of the system databases from one of the members of the seedlist. Once the status flips to "ok" the endpoint will return 200 and it's safe to direct requests to the new node.
* Improve retry_until (#1725)Jay Doane2018-11-102-8/+42
| | | | | | | | | | | * Fix bug in epoch millisecond calculation * Include timeout milliseconds in exception message * Support assertions in retry_until Previously, retry_until would only work with boolean conditions. This change supports assertions in code being retried, which requires fewer changes to wrap existing code containing assertions.
* Retain replication stats between job runsNick Vatamaniuc2018-11-094-13/+190
| | | | | | | | | | | | | | | Previously stats counts between job runs were reset. So if a job was stopped and restarted by the scheduler, its docs_written, docs_read, doc_write_failures, etc., counts would go back to 0. For doc_write_failures this was especially bad as it hid the fact that some documents were not replicated to the target because either a VDU failed or one of the limits were hit. This change preserves stats across job runs. Everytime active tasks is updated, the stats object in rep record of each job in scheduler's ets table will be updated asynchronously. On next job start the job will reinitialize from last saved stats. Relates somewhat to issue #1159
* feat: update couch-config to match #1602 (#1723)Jan Lehnardt2018-11-091-1/+1
|
* feat: change enaabling of chttpsd to `[ssl] enable = true`Jan Lehnardt2018-11-092-6/+16
| | | | | The previous configuration `[daemons] httpsd = {chttpd, start_link, [https]}` is also sill supported for backwards cmpatibility reasons.
* feat: remove redundant string parsingJan Lehnardt2018-11-091-11/+11
|
* feat: move handler definition to .app fileJan Lehnardt2018-11-092-35/+39
|
* simplify, h/t @vatamaneJan Lehnardt2018-11-091-6/+1
|
* compatibility for erlang < 20Jan Lehnardt2018-11-092-4/+3
|
* remove daemons from config js testsJan Lehnardt2018-11-091-3/+0
|
* remove deprecated http proxy code and tests from couch_httpdJan Lehnardt2018-11-092-884/+0
|
* test: fix os proc testsJan Lehnardt2018-11-093-7/+7
|
* feat: point to branch on couhc_config that is needed hereJan Lehnardt2018-11-091-1/+1
|
* feat: remove deprecated os_daemonsJan Lehnardt2018-11-093-665/+0
|
* feat: move [native_]query_server & os_daemons setup out of runtime configJan Lehnardt2018-11-097-25/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CouchDB ships with two default query_servers (javascript and coffeescript) as well as one default native_query_server (query aka mango). These used to be configured in default.ini in these sections: ``` [query_servers] javascript = {{prefix}}/bin/couchjs {{prefix}}/share/server/main.js coffeescript = {{prefix}}/bin/couchjs {{prefix}}/share/server/main-coffee.js ; enable mango query engine [native_query_servers] query = {mango_native_proc, start_link, []} ; erlang query server ; erlang = {couch_native_process, start_link, []} ``` This allowed end-users post-install and even runtime-changes to which query servers are enabled and where their binaries live. This patch changes things, so only a post-install, but not at-runtime changes are possible from now on. This still allows people to configure their CouchDB to run a third- party query server like the somewhat popular Python query server, but it changes the way the setup is done. Query Servers The javascript and coffeescript query servers continue to be enabled by default. Setup differences have been moved from default.ini to the couchdb and couchdb.cmd start scripts respectively. Additional query servers can now be configured using environment variables: ``` export COUCHDB_QUERY_SERVER_PYTHON="/path/to/python/query/server.py with args" couchdb ``` Where the last segment in the environment variable matches the usual lowercase(!) query language in the design doc `language` field. Multiple query servers can be configured by using more environment variables. Native Query Servers The mango query server continues to be enabled by default. The erlang query server continues to be disabled by default. This patch adds a `[native_query_servers] enable_erlang_query_server = BOOL` setting (defaults to `"false"`) to enable the erlang query server. If the legacy configuration for enabling the query server is detected, that is counted as a `true` setting as well, so existing configurations continue to work just fine. Windows Since the setting of the `./configure` time `PREFIX` happens during `make release`, I had to adapt the `couchdb` and `couchdb.cmd` scripts to have the correct env vars set and the `PREFIX` replaced there. I did this to the best of my abilities and research, but this needs review from the Windows team (Hi Joan! :). OS Daemons Although deprecated in 2.2.0, we’re keeping support for this until 3.x, but the configuration changes analogous to query servers. Previously, configuration looked like this: ``` [os_daemons] name = /path/to/daemon with args ``` With this patch, setup looks like this: ``` COUCHDB_OS_DAEMON_NAME="/path/to/daemon with args" couchdb ``` Multiple OS Daemons can be started with multiple env vars. The final segment in the env var becomes the daemon identifier inside CouchDB as lowercase(!).
* remove config: [daemons]Jan Lehnardt2018-11-092-11/+12
|