summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Updatejenkins-pipelineNick Vatamaniuc2017-06-225-2/+32
|
* Save IO logs even if exit reason isNick Vatamaniuc2017-06-162-3/+9
|
* Even more loggingNick Vatamaniuc2017-06-151-1/+3
|
* Uncomment test stageNick Vatamaniuc2017-06-151-2/+0
|
* Debug OS process IO logs uploadingNick Vatamaniuc2017-06-152-0/+11
|
* Testing new guard for Publish blockJoan Touzet2017-06-151-1/+3
|
* Merge pull request #599 from apache/pass-view-errorRobert Newson2017-06-151-3/+8
|\ | | | | Pass error through (usually timeout)
| * Pass error through (usually timeout)pass-view-errorRobert Newson2017-06-151-3/+8
|/
* Enable OS process IO logging + upload for Travis and Jenkins testsNick Vatamaniuc2017-06-143-0/+27
| | | | Issue #551
* Log OS process I/ONick Vatamaniuc2017-06-132-3/+121
| | | | | | | | | | | | | | | | | | | | | | | Logging is based on an environment variable: `COUCHDB_IO_LOG_DIR` If set, logs will go to that directory. Logs are per `couch_os_process` Erlang process. There are 3 files saved for each process: ``` <unixtimestamp>_<erlangpid>.in.log : Input, data coming from the proess <unixtimestamp>_<erlangpid>.out.log : Output, data going to the process <unixtimestamp>_<erlangpid>.meta : Error reason ``` Log files are saved as named (visible) files only if an error occurs. If there is no error, disk space will still be used as long the process is alive. But as soon as it exists, file will be unlinked and space will be reclaimed. Issue: #551
* Account for extra newlines in response bodyPaul J. Davis2017-06-091-23/+17
| | | | | | | | | | | | | | The timeout=1 (1ms) parameter would some times trigger extra newlines to be included in the response body. The use of `binary:split/2` would then return different portions of the body depending on timing in the cluster. This change adds a helper function to split out all newlines in the response and then returns the last non-empty line. This also removes introspection of the clustered update sequence since this is an HTTP API behavior tests and those are defined as opaque values. COUCHDB-3415
* Fix broken eunit test in changes_since_test_ test suitejiangphcn2017-06-093-67/+112
| | | | COUCHDB-3360/FB 85485
* Properly kill OS daemons during testNick Vatamaniuc2017-06-081-3/+10
| | | | | | Even if it clean up fails use `kill` to avoid failing the next set of tests. Issue: #571
* Opimize writing btree nodesPaul J. Davis2017-06-081-1/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As it turns out, the original change in COUCHDB-3298 ends up hurting disk usage when a view emits large amounts of data (i.e., more than half of the btree chunk size). The cause for this is that instead of writing single element nodes it would instead prefer to write kv nodes with three elements. While normally we might prefer this in memory, it turns out that our append only storage this causes a significantly more amount of trash on disk. We can show this with a few trivial examples. Imagine we write KV's a through f. The two following patterns show the nodes as we write each new kv. Before 3298: [] [a] [a, b] [a, b]', [c] [a, b]', [c, d] [a, b]', [c, d]', [e] [a, b]', [c, d]', [e, f] After 3298: [] [a] [a, b] [a, b, c] [a, b]', [c, d] [a, b]', [c, d, e] [a, b]', [c, d]', [e, f] The thing to realize here is which of these nodes end up as garbage. In the first example we end up with [a], [a, b], [c], [c, d], and [e] nodes that have been orphaned. Where as in the second case we end up with [a], [a, b], [a, b, c], [c, d], [c, d, e] as nodes that have been orphaned. A quick aside, the reason that [a, b] and [c, d] are orphaned is due to how a btree update works. For instance, when adding c, we read [a, b] into memory, append c, and then during our node write we call chunkify which gives us back [a, b], [c] which leads us to writing [a, b] a second time. The main benefit of this patch is to realize when its possible to reuse a node that already exists on disk. It achieves this by looking at the list of key/values when writing new nodes and comparing it to the old list of key/values for the node read from disk. By checking to see if the old list exists unchanged in the new list we can just reuse the old node. Node reuse is limited to when the old node is larger than 50% of the chunk threshold to maintain the B+Tree properties. The disk usage improvements this gives can also be quite dramatic. In the case above when we have ordered keys with large values (> 50% of the btree chunk size) we find upwards of 50% less disk usage. Random keys also benefit as well though to a lesser extent depending on disk size (as they will often be in the middle of an existing node which prevents our optimization). COUCHDB-3298
* Revert "Make couch_btree:chunkify/1 prefer fewer chunks"Paul J. Davis2017-06-081-2/+4
| | | | This reverts commit 8556adbb98e79a09ec254967ee6acf3bef8d1fb6.
* Close idle dbsNick Vatamaniuc2017-06-074-35/+146
| | | | | | | | | | | | | | | | | | | | Previously idle dbs, especially sys dbs like _replicator once opened once for scanning would stay open forever. In a large cluster with many _replicator shards that can add up to a significant overhead, mostly in terms of number of active processes. Add a mechanism to close dbs which have an idle db updater. Before hibernation was used to limit the memory pressure, however that is often not enough. Some databases are only read periodically so their updater would time out. To prevent that from happening keep the last read timestamp in the couch file process dictionary. Idle check then avoid closing dbs which have been recently read from. (Original idea for using timeouts in gen_server replies belongs to Paul Davis) COUCHDB-3323
* Merge pull request #586 from cloudant/avoid_use_of_lengthiilyak2017-06-071-3/+3
|\ | | | | Avoid using length to detect non empty list
| * Avoid using length to detect non empty listILYA Khlopotov2017-06-071-3/+3
|/ | | | | | length(Values) is O(n) operation. Which could get expensive for long lists. Change the code to rely on pattern matching to detect non empty lists.
* Update Jiffy dependencyPaul J. Davis2017-06-071-1/+1
| | | | | Update to latest Jiffy. Not a whole lot new but this removes a huge test file that caused my source code analyzer to run slowly.
* Allow configuration of max doc IDs for optimised code path in changes filterAlex Anderson2017-06-062-7/+12
| | | | | | | | | | | | There are two implementations for filtering the _changes feed by doc_ids. One implementation is faster, but requires more server resources. The other is cheaper but very slow. This commit allows configuration of the threshold at which couch changes to using the slower implementation using: [couchdb] changes_doc_ids_optimization_threshold = 100 COUCHDB-3425
* Merge pull request #580 from cloudant/83986-fix-url-encodingiilyak2017-06-063-3/+3
|\ | | | | Fix encoding issues
| * Fix encoding issuesILYA Khlopotov2017-06-053-3/+3
|/ | | | | | | This fixes encoding issues in responses on following requests: - PUT: {db}/{design}/_update/{update}/{doc_id} - PUT: {db}/{doc_id}/{att_id}
* Don't wrap real error in badmatch exceptionEric Avdey2017-06-051-0/+2
|
* (build) Gracefully fail to upload logfiles w/ no credsJoan Touzet2017-06-051-1/+7
|
* Add retry to get_view_stateEric Avdey2017-06-051-15/+36
| | | | | | | | | | | There are a race condition in `get_view/4`, between aquiring index's Pid and getting its state, that surface when the same signature DDoc got rapidly deleted and re-created. This patch addresses this by adding retry logic to get_view_index_state.
* feat(test): separate timeoutsJan Lehnardt2017-06-031-1/+2
|
* chore(test): increase test timeout #571Jan Lehnardt2017-06-031-1/+1
|
* chore: more test debugging for COUCHDB-3415Jan Lehnardt2017-06-031-0/+2
|
* chore: remove bogus hint in `make javascript`Jan Lehnardt2017-06-031-1/+0
|
* feat(test): wait for db and index shutdownJan Lehnardt2017-06-031-10/+23
|
* add node count handling to ./dev/runRobert Kowalski2017-06-031-4/+5
|
* bump documentation refJoan Touzet2017-06-031-1/+1
|
* JS test: wait even longer for restartServer on slow VMsJoan Touzet2017-06-021-2/+2
|
* Remove another invalid post-2.0 test case (ddoc_cache related)Joan Touzet2017-06-021-20/+0
| | | | | | | | | | | | This test case is failing for the same reason as the failures in #559, namely a GET on a _show, a PUT to the _show's ddoc to change the _show function, and a subsequent GET on the same _show that returns a result that is seemingly outdated. Late ddoc_cache eviction is still the problem; setting ddoc_cache max_objects to 0 ensures this test always passes. Based on the discussion in #559 I am deleting this test as well, direct on master with approval from @janl and @davisp.
* Disable unstable JS _show ETag testJoan Touzet2017-06-022-34/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The full discussion is in #559, but here is a summary. Through instrumentation of ddoc_cache and ets_lru I suspect that this is caused by cache eviction happening after the second GET. While I didn't instrument exactly where the GET occurs it's clear that it's fairly late, certainly after the PUT 201 is returned, and likely after the subsequent GET actually reads from ddoc_cache. After applying a change to allow me to completely disable the ddoc_cache (-ddoc_cache max_objects 0 in vm.args) I ran the test on a loop overnight, and the test never failed (>1000 executions). Previously the test would fail every 20-30 executions. TL;DR: we can't guarantee immediate ddoc_cache eviction on a ddoc update, even for a single .couch file on a single node. (For obvious reasons we definitely can't guarantee this in a cluster configuration.) I will document this as a backwards compatibility change in 2.0 and forward with a separate checkin to couchdb-documentation. Thanks to @rnewson @janl and @davisp for helping track this one down! This checkin also includes an improvement to the output when a JS test fails a notEquals assertion. Closes #559
* bump ets_lru dependencyJoan Touzet2017-06-021-1/+1
|
* Allow ddoc_cache to be fully disabledJoan Touzet2017-06-021-3/+3
|
* Improve JS test harness restartServer() support fnJoan Touzet2017-06-022-35/+28
| | | | | | | | | | | | restartServer() is still erroring out sometimes in Travis/Jenkins. This PR both bumps the timeout to 15s as well as changes the detection mechanism for restart to look for the uptime in _system to reset to a low number. This PR also removes the eclipsed redundant restartServer() definition in couch_test_runner.js. Closes #553
* Notify couch_index_processes on all shards when ddoc updatedMayya Sharipova2017-06-023-0/+183
| | | | | | | | | | | Before when a design doc is updated/deleted, only one couch_index process was notified - the one which shard contained a design doc. couch_index processes from other shards still continued to exist, and indexing activities for these processes were still be going on. The patch notifies couch_index_processes on all shards COUCHDB-3400
* couchup rebuild timeout must be passed as a floatJoan Touzet2017-06-011-1/+1
|
* Merge branch '3417-add-compaction-logging'Tony Sun2017-05-312-4/+16
|\ | | | | | | COUCHDB-3417
| * add compaction logging3417-add-compaction-loggingTony Sun2017-05-302-4/+16
| | | | | | | | | | | | | | | | To predict future compaction results, we log pre-compaction and post-compaction file sizes. These log results will be used as data points for regression analysis. COUCHDB-3417
* | attempt to stabilise users_db_security.jsJoan Touzet2017-05-311-0/+1
| |
* | Merge pull request #550 from cloudant/export-test_request_5iilyak2017-05-301-1/+1
|\ \ | | | | | | Export test_request:request/5 function
| * | Export test_request:request/5 functionILYA Khlopotov2017-05-301-1/+1
|/ / | | | | | | | | | | Currently it is impossible to pass authentication options to test_request:request. This commit exports request/5 which accept options argument.
* | Fix rewrite_js test: do not delete/create a DB in rapid successionJoan Touzet2017-05-301-1/+1
| |
* | New Jenkinsfile for multibranch pipeline buildJoan Touzet2017-05-282-3/+308
| |
* | Merge pull request #542 from apache/3426-forbidden-errorRobert Newson2017-05-261-0/+4
|\ \ | | | | | | Send a better error when opening a db without authorisation
| * | Send a better error when opening a db without authorisation3426-forbidden-errorRobert Newson2017-05-261-0/+4
| | | | | | | | | | | | COUCHDB-3426
* | | Remove "--prefix" option from README-DEVAlex Anderson2017-05-261-4/+0
|/ / | | | | | | This option is no longer available.