summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* TMP - Now with more debug!tmp-fix-compaction-daemon-test-with-psePaul J. Davis2018-02-281-0/+4
|
* TMP - Debug logging for Jenkins failuresPaul J. Davis2018-02-281-0/+1
|
* Ensure deterministic revisions for attachmentsPaul J. Davis2018-02-283-13/+21
| | | | | | | | | | | | | | | | This re-fixes a corner case when recreating a document with an attachment in a single multipart request. Since we don't detect that we need a new revision until after the document has been serialized we need to be able to deserialize the body so that we can generate the same revisions regardless of the contents of the database. If we don't do this then we end up including information from the position of the attachment on disk in the revision calculation which can introduce branches in the revision tree. I've left this as a separate commit from the pluggable storage engine work so that its called out clearly for us to revisit. COUCHDB-3255
* Add storage engine test suitePaul J. Davis2018-02-2812-0/+2216
| | | | | | | | This allows other storage engine implementations to reuse the same exact test suite without having to resort to shenanigans like keeping vendored copies up to date. COUCHDB-3287
* Implement pluggable storage enginesPaul J. Davis2018-02-2841-1879/+1369
| | | | | | | | | This change moves the main work of storage engines to run through the new couch_db_engine behavior. This allows us to replace the storage engine with different implementations that can be tailored to specific work loads and environments. COUCHDB-3287
* Add legacy storage engine implementationPaul J. Davis2018-02-285-0/+1975
| | | | | | | | This is the legacy storage engine code. I've kept it as part of the core couch application because we'll always need to have at least one storage engine available. COUCHDB-3287
* Add couch_db_engine modulePaul J. Davis2018-02-281-0/+893
| | | | | | | | This is the primary API for pluggable storage engines. This module serves as both a behavior and a call dispatch module for handling the engine state updates. COUCHDB-3287
* Remove old rolling reboot upgrade codePaul J. Davis2018-02-281-7/+3
| | | | | | | | | | This relied on having introspection into the state of a #doc{} record that is no longer valid with PSE. This is a harmless change as it was only necessary when performing a rolling reboot to a version that included the new get_meta_body_size function. We can remove it now because anyone wanting to do a rolling reboot with PSE will have to step through a version that includes commit aee57bf which includes the previous upgrade logic as well.
* Prevent chttpd multipart zombie processesJan Lehnardt2018-02-231-12/+65
| | | | | | | | | Occasionally it's possible to lose track of our RPC workers in the main multipart parsing code. This change monitors each worker process and then exits if all workers have exited before the parser considers itself finished. Fixes part of #745
* Avoid unconditional retries in replicator's http clientNick Vatamaniuc2018-02-211-6/+1
| | | | | | | | | | | | | | | | | | | | | | In some cases the higher level code from `couch_replicator_api_wrap` needs to handle retries explicitly and cannot cope with retries happening in the lower level http client. In such cases it sets `retries = 0`. For example: https://github.com/apache/couchdb/blob/master/src/couch_replicator/src/couch_replicator_api_wrap.erl#L271-L275 The http client then should avoid unconditional retries and instead consult `retries` value. If `retries = 0`, it shouldn't retry and instead bubble the exception up to the caller. This bug was discovered when attachments were replicated to a target cluster and the target cluster's resources were constrainted. Since attachment `PUT` requests were made from the context of an open_revs `GET` request, `PUT` request timed out, and they would retry. However, because the retry didn't bubble up to the `open_revs` code, the second `PUT` request would die with a `noproc` error, since the old parser had exited by then. See issue #745 for more.
* feat: update mochiweb to 2.17.0Jan Lehnardt2018-02-201-1/+1
|
* Use callbacks for couch_event_listener behaviorNick Vatamaniuc2018-02-151-14/+14
| | | | This knocks out a few dialyzer errors
* Bump config to 1.0.2 for dialyzer related fixesNick Vatamaniuc2018-02-151-1/+1
|
* Add config app to couch_replicator app dependenciesNick Vatamaniuc2018-02-151-0/+1
| | | | | | | It depends on and uses `config`. Obviously it still works without it, but this eliminates Dialyzer errors such as: `Callback info about the config_listener behaviour is not available`
* feat: add ./configure --dev as alias for -c --disable-{docs,fauxton}Jan Lehnardt2018-02-141-0/+9
|
* Simplify make dist approachJoan Touzet2018-02-132-3/+14
|
* Merge pull request #1143 from cloudant/issue-820-remove-queries-for_all_docsiilyak2018-02-063-120/+9
|\ | | | | Remove queries for _all_docs, _design_docs and _local_docs
| * Remove queries for _all_docsjiangphcn2018-02-063-120/+9
|/ | | | issue 820
* Fix for issue #1134 clean up dev/lib before run mango tests (#1135)Juanjo Rodriguez2018-01-311-7/+4
| | | | * make javascript, test-cluster-with[out]-quorum and mango tests dependent of devclean target
* feat: add quorum tests to make checkJan Lehnardt2018-01-311-0/+4
|
* Fix for issue #603 - Error 500 when creating a db below quorumJuanjo2018-01-316-11/+122
| | | | | | | | Add degrade-cluster option for cluster testing Add tests for different cluster conditions with/without quorum Add test-cluster-with-quorum and test-cluster-without-quorum tasks
* Merge pull request #1082 from cloudant/issue-822-all-dbs-infoiilyak2018-01-296-0/+214
|\ | | | | Introduce new _dbs_info endpoint to get info of a list of databases
| * Introduce new _dbs_info endpoint to get info of a list of databasesjiangphcn2018-01-296-0/+214
|/ | | | Fixes #822
* Make _design_docs to respect query parametersjiangphcn2018-01-262-8/+177
| | | | Fixes #1100
* Remove 'smartquote' from default.ini, broke the buildJoan Touzet2018-01-261-1/+1
|
* Decode destination header for doc copyjiangphcn2018-01-264-3/+39
| | | | Fixes #977
* Hide Auth information in replication document for readerjiangphcn2018-01-261-1/+31
| | | | | | - don't display credential information for user who just wants to check replication status. In basic authentication, the credential information is available in header field of doc
* Remove outdated docker targets and docs (#1109)Adam Kocoloski2018-01-243-60/+0
| | | | | We removed the Dockerfile in 6e57c43a and moved all Docker-related materials to apache/couchdb-docker, but we never cleaned up the Makefile targets or developer documentation.
* Make peruser database prefix configurablejiangphcn2018-01-233-19/+105
| | | | Fixes #876
* Merge pull request #1123 from ↵Eric Avdey2018-01-221-6/+4
|\ | | | | | | | | apache/fix-create_delete_database_continuously-test Set eunit timeout on a whole test object
| * Set eunit timeout on a whole test objectfix-create_delete_database_continuously-testEric Avdey2018-01-221-6/+4
|/
* Add support for queries in /{db}/_all_docs POSTjiangphcn2018-01-175-13/+124
| | | | Fixes #820
* Create all needed directories to build docs (#1115)Adam Kocoloski2018-01-171-0/+1
|
* Merge pull request #1085 from cloudant/issue-969-update_seq-trueEric Avdey2018-01-162-3/+40
|\ | | | | Return update_seq and offset when update_seq is true and keys is set
| * Return null for update_seq and offset if update_seq is truejiangphcn2018-01-162-3/+40
|/ | | | issue 969
* Fix couch_peruser_testEric Avdey2018-01-151-22/+45
| | | | | Fix a random mashup of test object generators with normal assertions.
* Allow override of `-args_file` and `-config` parameters (#1095)Edwin Fine2018-01-131-2/+6
| | | | | | | | | | | | | | | | | The existing `couchdb` start script hard-codes the arguments to `-args_file` and `-config`. Although it is possible to copy this script and modify it, or modify it in place, that is less than ideal and can lead to all kinds of difficulties. This PR adds the following environment variables: - `ARGS_FILE`: By default, set to the existing hard-coded value. - `SYSCONFIG_FILE`: By default, set to the existing hard-coded value. - `COUCHDB_ARGS_FILE`: If non-empty, overrides `ARGS_FILE`. - `COUCHDB_SYSCONFIG_FILE`: If non-empty, overrides `SYSCONFIG_FILE`. By changing the script to use these environment variables, it makes it easily possible to use different settings without tinkering with the pristine installed CouchDB environment.
* Remove warning on `couch_epi_codegen` compileEric Avdey2018-01-122-7/+16
| | | | | | | | Change runtime choice between `erl_scan:token_info` and `erl_scan:line` to compilation conditional one. This is getting rid of compilation deprecation warning and also should speed up things a bit.
* Simplify couch_key_tree test setupNick Vatamaniuc2018-01-121-7/+11
| | | | | | | Avoid starting 4 applications (config, couch_log, ioq and couch_epi) just to handle a call to config:get. Instead just mock the config directly. This also speeds up the test suite a bit.
* fallback to "selector" on empty "partial_filter_selector" (#1098)Will Holley2018-01-093-12/+17
| | | | | | | | | | | | | | | | | | | | | | | Mango text indexes historically supported partial indexes defined via a "selector" field. This was renamed to "partial_filter_selector" in b98de40 but the fallback code did not correctly handle the case where a "selector" existed alongside a "partial_filter_selector". This situation can occur when a the _index endpoint is used to create a text index with a "selector". The resulting design document contains an empty "partial_filter_selector" field *and* the "selector" field that was passed in. The previous implementation of the fallback would detect the presence of "partial_filter_selector" and use the empty value (match all docs) instead of faling back to the "selector" field. This commit changes the behaviour so that a "selector" will be used even if an empty "partial_filter_selector" is present. A secondary fix would be to change the index creation so that we never use "selector" in the underlying index design document, even if it is passed to the _index API.
* Return friendly error message when creating user with invalid password (#1087)Peng Hui Jiang2018-01-062-2/+40
| | | | | | | | | | | | * Return friendly error message when creating user with invalid password - Return friendly error message instead of returning unknown_error and function_clause when creating a use with non-string password. issue 1051 * Add check for salt issue 1051
* Merge pull request #1091 from apache/better-mango-test-recreate-functionEric Avdey2018-01-041-6/+8
|\ | | | | Make sure mango tests's recreate fun creates db
| * Make sure mango tests's recreate fun creates dbEric Avdey2018-01-041-6/+8
|/ | | | | | | | | | Rapid same database deletion/creation is a known antipattern prone to a race condition, especially on slow VMs. This fix modifies mango test's helper function used for db recreation to ensure that we are actually starting tests when a database created and empty.
* Merge pull request #1092 from apache/use-uuid-in-eunit-dbnamesEric Avdey2018-01-041-7/+4
|\ | | | | Use uuid in tmp db names in unit tests
| * Use uuid in tmp db names in unit testsuse-uuid-in-eunit-dbnamesEric Avdey2018-01-041-7/+4
|/ | | | | | | | | | This changes naming of temporary eunit databases and files from using unique_monotonic_integer to couch_uuids:random to remove performance penalty and normalize naming across erlang releases. Also getting rid of unnecessary inter-types convertion.
* Merge pull request #1090 from apache/cleanup-on-setup_eunitEric Avdey2018-01-041-0/+20
|\ | | | | Cleanup data dirs in eunit_plugin before test run
| * Cleanup data dirs in eunit_plugin before test runEric Avdey2018-01-041-0/+20
|/ | | | | | | | | | | | | | | | We use `unique_monotonic_integer` to name the test databases in unit testing. That means that on erlang R > 18 we are always creating databases with same names. When unit tests crashing or don't properly cleaning up on teardown, they are leaving behind old database files, son on a next run tests' setup fails with `database exists` exception. This fix cleans up old database files making sure we are always running unit tests from same blank state.
* Merge pull request #1078 from cloudant/issue-832-couch_log-refactoriilyak2017-12-201-24/+9
|\ | | | | Refactor couch_log.erl
| * Refactor couch_logjiangphcn2017-12-211-24/+9
|/ | | | issue 832
* Fix mango native proc crash (#1067)Eric Avdey2017-12-202-2/+36
| | | | | | | | | | Don't crash on receiving cast stop When soft limit is reached couch_proc_manager evicts idle processes by casting on them `stop` message. Since mango_native_proc doesn't handle this message it results to its crash with `invalid_cast` reason.