summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Add downgrade function to downgrade database with clustered purgeCOUCHDB-3226-downgrade-clustered-purgejiangph2018-09-217-4/+262
| | | | | | | | | | | | | | | | - provide downgrade functionality in case there is need to downgrade database which was modified by builds with clustered purge feature. After database is modified by builds with clustered purge feature, the disk version is bumped to 7. Also, there are two newly introduced trees: PurgeTreeState and PurgeSeqTreeState. Once downgrade function is called, the disk version is back to the latest version of current build. Also, purge_seq and purged_docs are re-introduced again. COUCHDB-3226 Add test
* Reduce size of #leaf.atts keysNick Vatamaniuc2018-08-151-2/+8
| | | | | | | | | | | | | | | | | | | `#leaf.atts` data structure is a `[{Position, AttachmentLength}, ...]` proplist which keeps track of attachment lengths and it is used when calculating external data size of documents. `Position` is supposed to uniquely identify an attachment in a file stream. Initially it was just an integer file offset. Then, after some refactoring work it became a list of `{Position, Size}` tuples. During the PSE work streams were abstracted such that each engine can supply its own stream implementation. The position in the stream then became a tuple that looks like `{couch_bt_engine_stream,{<0.1922.0>,[{4267,21}]}}`. This was written to the file the `#leaf.atts` data structure. While still correct, it is unnecessarily verbose wasting around 100 bytes per attachment, per leaf. To fix it use the disk serialized version of the stream position as returned from `couch_stream:to_disk_term`. In case of the default CouchDB engine implementation, this should avoid writing the module name and the pid value for each attachment entry.
* Merge pull request #1486 from cloudant/fix-doc-update-case-clauseiilyak2018-08-152-2/+59
|\ | | | | Expose document update errors to client
| * Expose document update errors to clientJay Doane2018-08-132-2/+59
|/ | | | | | | | | Currently, errors resulting from race conditions during document updates don't get handled correctly, result in a case error, and sending a 500 to the client. This change instead allows errors, which occur in the race to sync a doc update across the cluster, to be exposed to the client.
* Fix session based replicator auth when endpoints have require_valid_user setNick Vatamaniuc2018-08-131-12/+78
| | | | | | | | | | | | | | | | | | If _session response is 401 and WWW-Authentication header is set assume endpoint has require_valid_user set. Remember that in the state and retry to reinitialize again. If it succeeds, keep sending basic auth creds with every subsequent _session request. Since session uses the replicator worker pool, it needs to handle worker cleanup properly just like couch_replicator_httpc module does. If response headers indicate the connection will be closed, don't recycle it back to the pool, otherwise during an immediate retry there will be a connection_closing error, instead follow what the server indicated and stop the worker then release it to the pool. The pool already knows how to handle dead worker processes. This is needed with this commit, because we now have a pattern of an immediate retry after an auth failure. Fixes #1550
* Merge pull request #1553 from apache/ref-match-1544Robert Newson2018-08-101-2/+2
|\ | | | | Ensure we only receive the correct DOWN message
| * Ensure we only receive the correct DOWN messageRobert Newson2018-08-101-2/+2
|/ | | | relates to issue #1544.
* Move mango selector matching to the shard levelGarren Smith2018-08-084-20/+156
| | | | | | | | | | This moves the Mango selector matching down to the shard level. this would mean that the document is retrieved from the index and matched against the selector before being sent to the coordinator node. This reduces the network traffic for a mango query Co-authored-by: Paul J. Davis <paul.joseph.davis@gmail.com> Co-authored-by: Garren Smith <garren.smith@gmail.com>
* Add rexi ping messageGarren Smith2018-08-082-0/+11
| | | | | | | Add a ping message to rexi to avoid any long running operations from timing out. Long running operations at the node level can exceed the fabric timeout and be cancelled. Sending a ping message back will stop that from happening.
* Merge pull request #1432 from cloudant/support-callback-module-data-provideriilyak2018-08-084-14/+104
|\ | | | | Support callback module data provider
| * Update documentationILYA Khlopotov2018-08-081-0/+32
| |
| * Add 'callback_module' providerILYA Khlopotov2018-08-074-4/+62
| |
| * Rename 'module' data provider to 'static_module'ILYA Khlopotov2018-08-073-11/+11
|/
* Bump fauxtonJoan Touzet2018-08-071-1/+1
|
* Use new mochiweb recbuf|sndbuf undefined settingJoan Touzet2018-08-062-4/+5
| | | | Fixes #1409
* added missing dependencies for Debian-based systemsCerem Cem ASLAN2018-08-051-0/+3
|
* Fixed use of find ... -printf "%f" on Mac OS by replacing it with -exec basenameSergey Shevelev2018-08-041-2/+2
| | | | Fixes issue #1028
* Merge pull request #1484 from cloudant/fix-stats-reducer-for-arrayiilyak2018-08-011-4/+50
|\ | | | | Fix _stats reducer when map function emits array
| * Fix _stats reducer when map function emits arrayILYA Khlopotov2018-08-011-4/+50
|/
* remove obsolete update_notification featureJan Lehnardt2018-07-312-89/+0
|
* bump fauxtonJoan Touzet2018-07-311-1/+1
|
* Improve logging from test_utilILYA Khlopotov2018-07-291-0/+3
| | | | | | | Sometimes it is hard to guess what went wrong when application started via `test_util:start_applications` or `test_util:start_couch` is unable to start. Since the traceback was truncated. This change would print the reason in addition to the traceback.
* bump docs dependency2.2.0-RC1Joan Touzet2018-07-241-1/+1
|
* [travis] 20.1 -> 20.3Joan Touzet2018-07-241-1/+1
|
* Bump fauxton dependencyJoan Touzet2018-07-241-1/+1
|
* Enable replication client _session auth by defaultJoan Touzet2018-07-242-6/+5
| | | | Relates to #1153 and #1176
* Revert "Add bcrypt hashing option"Joan Touzet2018-07-1814-367/+22
| | | | This reverts commit 817b2b6f5f0883092df60c1ec8ec7ec6d6094a23.
* Revert "Replace resource expensive bcrypt test with shorter version (#1231)"Joan Touzet2018-07-181-17/+17
| | | | This reverts commit 89a727b625e74f40fcf612bda18421b8fc21eead.
* Revert "Make loginUser wait for successful authentication"Joan Touzet2018-07-181-7/+2
| | | | This reverts commit 6ffe0421ac524138a6b48fd010f2540631b83d16.
* bump hyper dependency, fix Windows buildJoan Touzet2018-07-181-1/+1
|
* Switch fabric attachment receiver to use messagesNick Vatamaniuc2018-07-171-4/+5
| | | | | | | | | | | | | | | Function closures are fragile and attachment uploads would break if fabric_doc_attachments is different on any of the nodes in a cluster, like it might happen during a roling cluster upgrade. Previously fe53e437ca5ec9d23aa1b55d7934daced157a9e3 introduced two versions of the module one which handles function closure, other which handled message but only in this commit messages are starting to be sent. To avoid breakages in attachemnt uploads during the period of a rolling cluster upgrade, make sure to upgrade to that commit first then upgrade to this change. Issue #1394
* Add missing default case clause, fixes #1450Joan Touzet2018-07-171-1/+1
|
* re-raise max_http_request_size to 4GBJan Lehnardt2018-07-171-1/+1
|
* add retry to test_request:request()Jan Lehnardt2018-07-171-1/+5
|
* Improve detection of git tags/dirty statusJoan Touzet2018-07-172-10/+72
| | | | | | | | | | Unfortuantely, #1437 brought in a build bug that caused dist tarballs to be created always using the last tag that could be found on the tree. This lead to `master` building tarballs labelled `2.1.0`. The new approach includes extensive comments to explain the approach, fixes the bug, and for an encore adds -dirty if you're building a CouchDB with local changes that aren't committed to git.
* Report git sha on welcome requestJan Lehnardt2018-07-177-6/+26
| | | | Closes #1309
* Make MD5 hash implementation configurable (#1171)rokek2018-07-1621-46/+107
|
* improve ddoc test reliablilty by waiting for ddoc deletionJan Lehnardt2018-07-161-1/+7
|
* Optionally prevent non-admins from accessing /_all_dbsJan Lehnardt2018-07-152-1/+7
|
* demote notice to debug logs by @wycJan Lehnardt2018-07-151-5/+3
|
* validate bind address by @wycJan Lehnardt2018-07-151-10/+25
|
* Clarify bad index creation error messagesBrandon Gottlob2018-07-141-2/+2
| | | | Fixes #927
* wait for db deletion before db re-creation. Closes #1197Jan Lehnardt2018-07-141-0/+7
|
* raise timeouts in attachment testsJan Lehnardt2018-07-141-3/+3
|
* bump depsJan Lehnardt2018-07-141-2/+2
|
* string:trim() compat for couch_util:trim()Jan Lehnardt2018-07-141-0/+3
|
* Use couch_util:trim for greater erlang compatibilityRobert Newson2018-07-143-7/+34
|
* build: release candidate tarball should have -RCxDave Cottlehuber2018-07-141-3/+7
| | | | | | the released tarball should have -RCx in the name, but not in the extracted file, otherwise we can't simply rename the final artefact for our public release.
* build: ease pattern matching to be less pedantic about RCDave Cottlehuber2018-07-141-1/+1
| | | | | | | | | | | git-describe may have changed output formats. The previous regex doesn't allow any trailing content, and git-describe always appends -g<SHA> unless abbrev=0 is added. This approach pulls out only the matching tag, leaving behind any trailing garbage from git-describe, and as a bonus allows tagging a commit from within a branch, and running a release directly from the branch without needing to re-check out the tag itself.
* config: improve handling of admin-supplied changesDave Cottlehuber2018-07-142-4/+8
| | | | | | - send a readable error response from failed config set - trust but verify admin-supplied content in separate function - return specific error conditions for logging