summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Do not persist restart times setting in os_daemons_tests703-depersist-config-setJoan Touzet2017-07-211-1/+1
| | | | | | Looks like an oversight in commit 789f75d. Closes #703
* Improve JS restartServer() support functionJoan Touzet2017-07-211-10/+16
| | | | | | | | | | | Previously, we potentially could attempt to restart couch, immediately attempt to see if couch had restarted, and fail if the server wasn't there (pre- or post-restart). This change wraps all attempts to contact couch in restartServer() with try blocks and simplifies the check-if-restarted logic. Closes #669. May or may not help with #673.
* Explicitly mention Facebook "BSD+Patents" license in NOTICE perJoan Touzet2017-07-211-0/+2
| | | | | | LEGAL-303 Closes #697
* Temporarily disable Jenkins buildsJoan Touzet2017-07-211-327/+0
|
* Increase timeout of some replication testsNick Vatamaniuc2017-07-202-2/+2
| | | | | | | | Could reproduce issue #633 by limiting disk throughput in a VBox VM instance to about 5KB. Try to increase the timeouts to let it handle such apparent slowdowns. Fixed #633
* TMP: Add debug logging for failed assertionPaul J. Davis2017-07-191-0/+7
|
* Fix cancellation race in replication.js testsNick Vatamaniuc2017-07-181-1/+1
| | | | | | | | Replication cancelation doesn't immediately update active tasks. Instead, use the new `waitReplicationTaskStop(rep_id)` function to propery wait for the task status. Issue #634
* Simplify regression test for COUCHDB-1283Paul J. Davis2017-07-181-149/+21
| | | | | | | | | | | The previous version of this test relied on trying to bump into the all_dbs_active error from the couch_server LRU. This proves to be rather difficult to reliably provide assertions on behavior. In hindsight all we really care about is that the compactor holds a monitor against the database and then we can trust couch_server will not evict anything that is actively monitored. Fixes #680
* Remove get_details replicator job gen_server callNick Vatamaniuc2017-07-182-13/+0
| | | | | | | | | | | | | This was used from a test only and it wasn't reliable. Because of replicator job delays initialization the `State` would be either #rep_state{} or #rep. If replication job hasn't finished initializing, then state would be #rep{} and a call like get_details which matches the state with #rep_state{] would fail with the batmatch error. As seen in issue #686 So remove `get_details` call and let the test rely on task polling as all other tests do.
* Merge pull request #693 from cloudant/use-stop_sync-in-mem3-testiilyak2017-07-181-2/+2
|\ | | | | Use test_util:stop_config in mem3_util_test
| * Use test_util:stop_config in mem3_util_testILYA Khlopotov2017-07-181-2/+2
|/ | | | | | | The config:stop is asynchronous which causes test failures with error like the following {error,{already_started,<0.32662.3>}
* Merge pull request #691 from cloudant/3367-fix-test-caseiilyak2017-07-181-17/+17
|\ | | | | 3367 fix test case
| * Fix trailing whitespace issuesILYA Khlopotov2017-07-181-2/+2
| |
| * Use random name for _users db in testILYA Khlopotov2017-07-181-2/+3
| | | | | | | | | | | | | | | | We should use random names for databases. Otherwise the test fails with database already exists error. This commit uses random name for users db and corrects the section name for `authentication_db` setting. COUCHDB-3367
| * Use hashed password when we create admin in testILYA Khlopotov2017-07-181-1/+2
| | | | | | | | | | | | | | | | | | | | couch_server is responsible for calling hash_admin_passwords whenever "admin" section of config changes. However as you can see it from [here](https://github.com/apache/couchdb/blob/master/src/couch/src/couch_server.erl#L219) the call is asynchronous. This means that our test cases might fail when we try to using admin user while admin password is not yet hashed. COUCHDB-3367
| * Rename unused variablesILYA Khlopotov2017-07-181-12/+10
| | | | | | | | COUCHDB-3367
* | Fix test teardownPaul J. Davis2017-07-181-25/+31
| | | | | | | | | | | | | | | | We weren't stopping the correct set of applications as well as forgetting to unload meck. I've also changed the test generators so that they execute all of the provided assertions. Fix #687
* | fix double export of wait_updated/3Joan Touzet2017-07-181-2/+1
|/
* Fix _local_docs end-pointEric Avdey2017-07-176-48/+86
| | | | | | | | | | | | | | | | | | | This is a second attempt to fix _local_docs end-point. The previous one didn't work on big enough btree_local, because local btree doesn't have reduction fun, so reuse of couch_db_updater:btree_by_id_reduce/2 was crashing on a bad match as soon as btree_local was getting kp_node. Also using full fold to calculate total_rows value turned out to be resource expensive when a database have significant number of local documents. This fix avoids calculating of total_rows and offset instead always setting them to null and also setting to null update_seq when requested, since it doesn't have meaning in context of local documents. A fabric module fabric_view_all_docs.erl was copied and modified as fabric_view_local_docs.erl, because re-using it for processing of both types of the documents was getting rather convoluted. Jira: COUCHDB-3337
* Merge pull request #622 from cloudant/89551-keep_sending_changes-hotiilyak2017-07-171-2/+8
|\ | | | | Allow keep_sending_changes to use hot code upgrade
| * Allow wait_updated to switch to new module codeILYA Khlopotov2017-06-271-2/+5
| |
| * Allow keep_sending_changes to use hot code upgradeILYA Khlopotov2017-06-271-1/+4
| |
* | Merge pull request #628 from garrensmith/add-stable-to-mangoiilyak2017-07-174-7/+97
|\ \ | | | | | | Add stable and update support to Mango
| * | Add stable and update support to MangoGarren Smith2017-07-164-7/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This brings mango inline with views by supporting the new options `stable` and `update`. Fixes #621 chore: whitespace feat: add stale option to Mango fix: opts parsing
* | | Merge branch '3423-add-try-catch-mem3'Tony Sun2017-07-172-2/+41
|\ \ \
| * | | catch database not exist errorTony Sun2017-07-172-2/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If dbs do not exist, we catch the error for mem3_sync_security so that it can continue for databases that do exist. https://github.com/apache/couchdb/pull/538 COUCHDB-3423
* | | | feat: update for 2.0 patch by @guillettJan Lehnardt2017-07-163-39/+57
| | | | | | | | | | | | | | | | https://github.com/apache/couchdb-peruser/pull/3
* | | | bump couchdb-setup depJoan Touzet2017-07-161-1/+1
| |/ / |/| |
* | | Merge pull request #682 from apache/strong_rand_bytesRobert Newson2017-07-168-11/+11
|\ \ \ | | | | | | | | use crypto:strong_rand_bytes
| * | | use crypto:strong_rand_bytesRobert Newson2017-07-168-11/+11
|/ / /
* | | Merge pull request #681 from apache/remove-couch-cryptoRobert Newson2017-07-1625-146/+59
|\ \ \ | | | | | | | | Remove couch_crypto
| * | | Remove couch_cryptoRobert Newson2017-07-1625-146/+59
| | | | | | | | | | | | | | | | | | | | The crypto:{hash,hash_init,hash_update,hash_final} functions exist in all the versions of erlang supported by CouchDB.
* | | | Merge branch '3430-external-size-views'Tony Sun2017-07-152-12/+49
|\ \ \ \
| * | | | calculate data_size correctly3430-external-size-viewsTony Sun2017-07-152-12/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, we were calculating the ExternalSize for views by summing up all the nodes in the btree. Furthermore, this was the compressed size. Now we modify the reduce function to return an ExternalSize for uncompressed values in the KVList. PR: https://github.com/apache/couchdb/pull/608 COUCHDB-3430
* | | | | Revert "Revert "Use Ejson Body Instead of Compressed Body for External size ↵Robert Newson2017-07-153-4/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#606)"" This reverts commit c8ee29505c718ed6bd9687a664dae11d984d89a7. PR is here: https://github.com/apache/couchdb/pull/606
* | | | | Revert "Use Ejson Body Instead of Compressed Body for External size (#606)"Robert Newson2017-07-153-42/+4
|/ / / / | | | | | | | | | | | | This reverts commit dce6e34686329e711e1a6c50aae00761ecb3262e.
* | | | Use Ejson Body Instead of Compressed Body for External size (#606)Tony Sun2017-07-153-4/+42
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use ejson body instead of compressed body for external size In two places where we calculate the ExternalSize of the document body, we use the Summary which is a compressed version of the doc body. We change this to use the actual ejson body. In copy_docs we don't have access to the #doc record so we can't access the meta where we store the ejson body. Unfortunately, this means we have to decompress the document body after reading it from disk. COUCHDB-3429
* | | Fix flaky os daemons testsNick Vatamaniuc2017-07-141-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "should die" test was close to the edge of timing out. Daemon started up, slept for 1 second then died. However max_retries is 3 so the whole thing was happening 3 times in a row. The total wait was 4 seconds, but on slow machines 1 extra second was not enough for the overhead of forking the 3 processes and other setup stuff. Set restart times to 2. Hopefully 4 seconds should be enough overhead for 2 restarts. Also adjust sleep time for the "die quickly" test. 1 second there might not be enough for both restarts, so made it 2 just to be safe. Issue #675
* | | Remove unused TIMEOUT macro from os daemons moduleNick Vatamaniuc2017-07-141-1/+0
| | |
* | | Fix replication Javascript testNick Vatamaniuc2017-07-141-3/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test was flaky for a variety of reasons: * waitForSeq only waited for 3 seconds and on failure it never explitly indicated an error and just waited for the comparison below to fail. So made it wait for 30 seconds and also throw an exception right away if it fails. * Last waitForSeq was used after task was canceled. So it just wasted time waiting until timeout as the task was null. So created a function to wait for task to be null. * waitForSeq spun in a tight do/while loop querying _active_tasks. In some test environment with minimal CPU resources that's not the greatest thing to do. So made it wait for 0.5 seconds between retries. * waitForSeq waited for replication task's through_seq value to match source update sequence from source db info. Those don't necessarily match. Instead made waitForSeq use the changes feed last sequence since that's what the replication task uses to update through_seq.
* | | Make replication filter fetch error for _replicate return a 404Nick Vatamaniuc2017-07-141-0/+2
| | | | | | | | | | | | Previously it returned a 500 error.
* | | Improve UNIX dependency installation (Node.JS, Sphinx)Joan Touzet2017-07-131-6/+31
| | | | | | | | | | | | Closes #664
* | | Change recommended install path to /opt/couchdbJoan Touzet2017-07-131-13/+12
| | | | | | | | | | | | Also includes pointers to couchdb-pkg daemon scripts.
* | | Bump ets_lru for flaky test fixPaul J. Davis2017-07-131-1/+1
| | |
* | | Add tests for queries against _users dbEric Avdey2017-07-133-0/+130
| | |
* | | Send user_ctx to fabric's open_docEric Avdey2017-07-132-2/+7
| | |
* | | Send user_ctx to query_viewEric Avdey2017-07-131-1/+1
| | |
* | | Pass UserCtx to fabric's all_docs from mango queryEric Avdey2017-07-131-2/+5
| | |
* | | Fix timeout in couchdb_views_test for couchdb_1283Paul J. Davis2017-07-131-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I believe the race here was that the query could return before the actual index updating process exited. Then it was just a race to creating a database before the monitor is released. If we do end up creating the database before the monitor is released then the database we want to have closed ends up being ignored as its not idle. The second two created databases then don't end up forcing the database from couch_server's LRU which leads us to the timeout waiting for DatabaseMonRef to fire. Fixes #655
* | | Avoid a race when restarting an index updaterPaul J. Davis2017-07-131-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was encountered during the test suite runs on Travis. It turns out that when we restart the indexer its possible to already have the 'EXIT' message in our mailbox. When we do we'll then crash with an unknown_info error since our updater pid was changed during the restart. This change simple filters any 'EXIT' message from the old updater from the mailbox before restarting thew new index updater. Fixes #649