summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Change recommended install path to /opt/couchdbmove-install-targetJoan Touzet2017-07-131-13/+12
| | | | Also includes pointers to couchdb-pkg daemon scripts.
* Fix couchdb_os_proc_pool eunit timeoutsPaul J. Davis2017-07-121-2/+4
| | | | | | | | | There's a theory that the low memory limits on our CI instances are causing the tests spawning JS processes to fail. Given that we don't need them here we can trivially exclude that as a cause of the test failures. Fixes #631
* Update couch_native_proc to respect idle timeoutsPaul J. Davis2017-07-121-11/+35
|
* fix whitespace crimesRobert Newson2017-07-121-3/+3
|
* admin context in couch tests no longer necessary for compaction with the new ↵Frederick Kaempfer2017-07-123-3/+3
| | | | approach
* Require admin or db admin for compact requestsFrederick Kaempfer2017-07-121-2/+32
|
* Fix testFrederick Kaempfer2017-07-121-14/+12
|
* Add tests for db admin/db member compaction.Frederick Kaempfer2017-07-121-9/+73
|
* make sure to also run security check for design doc compactionFrederick Kaempfer2017-07-121-1/+1
|
* Require server or db admin user for db/_compact and db/_view_cleanup ↵Frederick Kaempfer2017-07-125-3/+131
| | | | endpoints following rnewson's suggestion
* Make couch_event_sup:stop/1 synchronousNick Vatamaniuc2017-07-111-5/+5
| | | | | | | | | | | | | | | | | | | | | | Because `stop/1` is asynchronous, and casts a stop message and as result the client process could end getting killed during termination/cleanup phase if this sequence of events took place: 1. Client calls `stop(ListerPid).` 2. couch_event_sup casts a `stop` message to couch_event_sup gen_server 3. `stop` message is delayed and client continues executing. 4. Client calls something like application:stop/1`. 5. `application:stop/1` terminates couch_event_sup gen_server. 6. App termination kills client process because it is still linked. So this make the stop synchrounous by using call instead of cast. Issue #644
* Remove deprecated OAuth 1.0 implementationJoan Touzet2017-07-0921-1327/+5
| | | | | | | Helps resolve issue #656. Implementation broken since bigcouch merge. Replicator oauth hooks are left in place for future work towards adding cookie-based authentication support.
* Fix Windows release buildsJoan Touzet2017-07-091-3/+4
|
* Merge branch 'master' of https://github.com/apache/couchdbJoan Touzet2017-07-081-0/+1
|\
| * Disable compaction daemon on eunit run couch startupsJoan Touzet2017-07-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 21f9544 enabled the compaction daemon by default. And commit 3afe3ad disabled the compaction daemon at the start of the compaction daemon tests. Unfortunately, the compaction daemon remains active during all the other EUnit tests. I attempted to override the [compactions] _default line in the file rel/files/eunit.ini but specifying `_default=` or `_default=[]` did not provide the desired behaviour. This change disables the _default config as part of `test_util:start_couch` after startup. This means there is a very brief period during which the daemon is running, but in empirical testing the only thing I've seen it manage to do is compact `_dbs` before being disabled. Tested with `make soak-eunit` for 3 hours; this seems to eliminate the `all_dbs_active` error we've been seeing in CI runs since the compaction daemon was enabled by default.
* | Fix Windows buildJoan Touzet2017-07-082-1/+2
|/
* Merge pull request #645 from cloudant/pass-user_ctx-in-fabric_view_mapEric Avdey2017-07-074-17/+30
|\ | | | | Pass db open options to fabric_view_map
| * Pass db open options to fabric_view_mapEric Avdey2017-07-064-17/+30
| | | | | | | | | | Pass database open options and user_ctx to query_view to allow proper access for _view and _list queries.
* | disable unstable stats.js testJoan Touzet2017-07-071-0/+25
| |
* | wipe all databases on test exitJoan Touzet2017-07-079-10/+26
| |
* | really disable compaction daemon for JS testsJoan Touzet2017-07-071-1/+2
| |
* | Bump jiffy depPaul J. Davis2017-07-061-1/+1
|/
* Remove some sleeps from change feed test.Nick Vatamaniuc2017-07-061-4/+33
| | | | | | | | | Couldn't remove all sleeps as they are also used to assert that nothing happened in a period of time or to track generalized progress over a period of time (the heartbeat test). Issue #630
* Merge pull request #648 from ↵iilyak2017-07-061-1/+1
|\ | | | | | | | | cloudant/fixup-for-fix-replicator-progress-reporting-2 Fix couch_replicator_changes_reader:process_change
| * Fix couch_replicator_changes_reader:process_changeILYA Khlopotov2017-07-051-1/+1
| | | | | | | | | | The size of the tuple was changed in all clauses of process_change but one. Remove TS argument from `#doc_info{id = <<>>}` clause of process_change.
* | test: expect compaction daemon to be offJan Lehnardt2017-07-062-3/+5
| |
* | feat: enable compaction daemon by defaultJan Lehnardt2017-07-061-1/+1
|/
* Make map functions distinct with each invocationsebastianro2017-07-051-0/+3
|
* Remove yet another invalid test case (ddoc_cache related)Joan Touzet2017-07-051-16/+0
| | | | | | | | | | | This test case is failing because of late ddoc_cache eviction. It'd be nice to validate that we correctly invalidate our cached CommonJS modules, but ddoc_cache makes such a test infeasible. See https://github.com/apache/couchdb/commit/85cfc71beb089c7881959c2ac7699b9b35b0f04b#diff-f2fc11abc651cc0b4e99643c85f2a5f6 as well as #559 for more detail. Closes #632
* Fix eunit timeout option for compression testsJoan Touzet2017-07-051-9/+17
| | | | Closes #629
* Fix mismatch between MAX_DBS_OPEN and default.iniJoan Touzet2017-07-051-1/+1
| | | | Closes #636
* bump docs depJoan Touzet2017-07-051-1/+1
|
* Also enable node decom using string "true"Jay Doane2017-07-041-1/+34
| | | | | | | | | | | | | | To decom a node, one normally inserts {"decom":true} into that node's document via the admin /nodes endpoint. However, it's easy to accidentally insert {"decom":"true"} instead, in which case the current mem3 allowed_nodes logic will include that node as allowed, which is probably not what was intended, and ultimately result in "500 badard" errors sent to the client. This changes the allowed_nodes algorithm to also accept {"decom":"true"} to decom a node. Thanks to Nick Vatamaniuc for discovering this shortcoming.
* Merge pull request #625 from apache/contributing-md-updateBenjamin Bastian2017-06-301-4/+4
|\ | | | | Update CONTRIBUTING.md to reflect monorepo
| * Update CONTRIBUTING.md to reflect monorepocontributing-md-updateBenjamin Bastian2017-06-301-4/+4
|/ | | | Also, there was a typo in the gitbox URL.
* Add a soak-eunit target to MakefilePaul J. Davis2017-06-301-0/+6
| | | | | | | | | | | | This allows developers to run eunit in a loop until a test crashes. This can be helpful for fixing flaky tests that are failing due to timing related issues. For instance: make soak-eunit apps=ddoc_cache suites=ddoc_cache_lru_test This command would run that specific test module repeatedly until it hit a timing condition that caused a failure. And yes, I used this change to fix that failure. :D
* Ensure replicator _active_tasks entry reports recent pending changes valueNick Vatamaniuc2017-06-283-15/+28
| | | | | | | | | | | | | | | | Previously there was a race between reporting the source update sequence between the the workers and the changes readers. Each one used separate incrementing timestamp sequences. In some cases that lead to pending changes being stuck. For example, if changes reader reported the highest sequence with timestamp 10000, then later workers reported it with sequences 5000, 5001, 5002, then all those reports would be ignored and users would see an always lagging pending changes value reported with timestamp 1000. The fix is to thread the last_sequence update through the changes queue to the changes manager, so only its timestamp sequence will be used. This removes the race condition.
* Merge pull request #614 from cloudant/fix-compaction_daemon_testsEric Avdey2017-06-241-22/+30
|\ | | | | Fix compaction daemon tests
| * Address a race on compacting process exitEric Avdey2017-06-231-1/+17
| | | | | | | | | | | | | | | | View compacting process can be just a bit slow on exit after swap_compacted call. This leads to the test failure, because compacting process holding on db monitor
| * Refactor compaction tests setup and teardownEric Avdey2017-06-231-11/+5
| |
| * Fix "not_mocked" error in compaction testsEric Avdey2017-06-231-12/+10
|/ | | | | | | | | | With meck unload set during per suit teardown all the mocked modules crashing with "not_mocked" error on attempt to stop couch in the final cleanup. This fix moves load and unload meck modules into global setup and cleanup
* Add X-Frame-Options (#582)garren smith2017-06-226-4/+200
| | | | | | Adds X-Frame-Options support to help protect against clickjacking. X-Frame-Options is configurable via the config and allows for DENY, SAMEORIGIN and ALLOW-FROM
* Merge branch '3358-use-efficient-set'Tony Sun2017-06-211-10/+6
|\ | | | | | | COUCHDB-3358
| * Use efficient set storage for field names3358-use-efficient-setTony Sun2017-06-211-10/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | When indexing a set of fields for text search, we also create a special field called $fieldnames. It contains values for all the fields that need to be indexed. In order to do that, we need a unique list of the form [[<<"$fieldnames">>, Name, [] | Rest]. The old code would add an element to the list, and then check for membership via lists:member/2. This is inefficient. Some documents can contain a large number of fields, so we will use gb_sets to create a unique set of fields, and then extract out the field names. COUCHDB-3358
* | Merge pull request #590 from cloudant/fix-couch_log_config_listener_testEric Avdey2017-06-161-4/+19
|\ \ | | | | | | Wait for listener's exit during restart test
| * | Wait for listener's exit during restart testEric Avdey2017-06-161-4/+19
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | To test a config listener's restart we are deleting event handler in config_event and then immediately checking event manager. This creates race when we can be a slightly early and catch old handler yet to be removed or slightly late and get new handler that already been installed. This patch addresses this by waiting for the old listener to quit and then waiting for a new handler to be installed.
* | Merge pull request #600 from cloudant/fix-couchdb_views_testsEric Avdey2017-06-161-4/+11
|\ \ | | | | | | Fix race in couchdb_views_tests
| * | Fix race in couchdb_views_testsEric Avdey2017-06-161-4/+11
|/ / | | | | | | | | | | | | | | | | | | | | There are a race condition in `restore_backup_db_file` function between couch_server eviction of an old db updater and a test quering view on restored db file. The query in test can get old record for the updater and then crash with `noproc` exception. This change makes `restore_backup_db_file` to wait until start of the new db updater.
* | Return 409 to PUT attachment with non-existent revJay Doane2017-06-163-3/+20
| | | | | | | | | | | | | | | | | | | | Currently we return a 500 and something like {"error":"{not_found,missing}","reason":"{1,<<\"000\">>}"} when an attempt is made to put an attachment document with a non-existent revision. This changes the behavior to return a 409 and {"error":"not_found","reason":"missing_rev"}"
* | Factor attachment_doc/0Jay Doane2017-06-161-20/+15
| |