1.6. 2.1.x Branch

    • When upgrading from 2.x to 2.1.1, if you have not customized your node name in , be sure to retain your original vm.args file. The default node name has changed from couchdb@localhost to couchdb@127.0.0.1, which can prevent CouchDB from accessing existing databases on the system. You may also change the name option back to the old value by setting -name couchdb@localhost in etc/vm.args by hand. The default has changed to meet new guidelines and to provide additional functionality in the future.

      If you receive errors in the logfile, such as internal_server_error : No DB shards could be opened. or in Fauxton, such as This database failed to load. you need to make this change.

    • The deprecated (and broken) OAuth 1.0 implementation has been removed.

    • If user code reads or manipulates replicator document states, consider using the [replicator] update_docs = true compatibility parameter. In that case the replicator will continue updating documents with transient replication states. However, that will incur a performance cost. Consider instead using the _scheduler/docs HTTP endpoint.

    • The stale parameter for views and _find has been deprecated in favour of two new parameters: stable and update. The old stale=ok behaviour is equivalent to stable=true&update=false, and the old stale=update_after behaviour is equivalent to stable=true&update=lazy. The deprecated stale parameter will be removed in CouchDB 3.0.

    • The new :httpd/max_http_request_size configuration parameter was added. This has the same behavior as the old couchdb/max_document_size configuration parameter, which had been unfortunately misnamed, and has now been updated to behave as the name would suggest. Both are documented in the shipped default.ini file.

      Note that the default for this new parameter is 64MB instead of 4GB. If you get errors when trying to PUT or POST and see HTTP 413 return codes in couchdb logs, this could be the culprit. This can affect couchup in-place upgrades as well.

    • : Certain critical config sections are blacklisted from being modified through the HTTP API. These sections can still be modified through the standard local.ini or local.d/*.ini files.

    • #916: now disables eval() and the Function() constructor by default. To restore the original behaviour, add the --eval flag to the definition of the javascript query server in your local.ini file.

    1.6.3.1. Security

    • : CouchDB now supports compilation and running under Erlang/OTP 20.x.

    • #756: The couch_peruser functionality is now really fixed. Really.

    • : The cookie domain for AuthSession cookies, used in a proxy authentication configuration, can now be customized via the ini file.

    • #858: It is now possible to modify shard maps for system databases.

    • : Due to an Erlang bug (ERL-343), invalid paths can be returned if volumes are mounted containing whitespace in their name. This problem surfaced primarily on macOS (Time Machine volumes). CouchDB now works around this bug in unpatched versions of Erlang by skipping the free space check performed by the compaction daemon. Erlang itself will correctly perform free space checks in version 21.0.

    • : The current node’s local interface can now be accessed at /_node/_local/{endpoint} as well as at /_node/<nodename>@<hostname>/{endpoint}.

    • The Dockerfile in the source repository has been retired. For a current Dockerfile, see the couchdb-docker repository.

    • Fauxton now uses a version of React with a BSD license.

    1.6.3.3. Performance

    • : CouchDB now no longer decompresses documents just to determine their uncompressed size. In tests, this has lead to improvements between 10-40% in both CPU and wall-clock time for database compaction.

    • The design document cache (ddoc_cache) has been rewritten to improve performance.

    • #808: Mango now supports . Partial indexes allow documents to be filtered at indexing time, potentially offering significant performance improvements for query selectors that don’t map cleanly to a range query on an index.

    • #740: Mango queries can now be paginated. Each query response includes a bookmark. The bookmark can be provided on a subsequent query to continue from a specific key.

    • : Mango _find accepts an execution_stats parameter. If present, a new object is included in the response which contains information about the query executed. The object contains the count of total keys examined (0 for json indexes), total documents examined (when include_docs=true is used), and the total quorum documents examined (when fabric doc lookups are used).

    • #816 and : Mango now requires that all of the fields in a candidate index must exist in a query’s selector. Previously, this check was incorrect, and indexes that might only contain a subset of valid documents might be selected by the query planner if no explicit index was specified at query time. Further, if a sort field is specified at query time, that field needs to exist (but could be null) in the results returned.

    1.6.3.5. Other

    The 2.1.1 release also includes the following minor improvements:

    • The Mango _find endpoint supports a new combination operator, $allMatch, which matches and returns all documents that contain an array field with all its elements matching all the specified query criteria.

    • New scheduling replicator. The core of the new replicator is a scheduler which allows running a large number of replication jobs by switching between them, stopping some and starting others periodically. Jobs which fail are backed off exponentially. There is also an improved inspection and querying API: _scheduler/jobs and _scheduler/docs:

      • _scheduler/jobs : This endpoint shows active replication jobs. These are jobs managed by the scheduler. Some of them might be running, some might be waiting to run, or backed off (penalized) because they crashed too many times. Semantically this is somewhat equivalent to _active_tasks but focuses only on replications. Jobs which have completed or which were never created because of malformed replication documents will not be shown here as they are not managed by the scheduler. _replicate replications, started form _replicate endpoint not from a document in a _replicator db, will also show up here.

      • _scheduler/docs : This endpoint is an improvement on having to go back and read replication documents to query their state. It represents the state of all the replications started from documents in _replicator db. Unlike _scheduler/jobs it will also show jobs which have failed or have completed.

      By default, scheduling replicator will not update documents with transient states like triggered or error anymore, instead _scheduler/docs API should be used to query replication document states.

    The 2.1.0 release also includes the following minor improvements:

    The 2.1.0 release includes fixes for the following issues:

    • : X-Couch-Update-NewRev header is missed if custom headers are specified in response of _update handler (missed in 2.0 merge)

    • COUCHDB-2731: Authentication DB was not considered a system DB

    • : (Superseded fix for replication exponential backoff)

    • COUCHDB-3090: Error when handling empty “Access-Control-Request-Headers” header

    • : Fix documentation on require_valid_user

    • COUCHDB-3113: fabric:open_revs can return {ok, []}

    • : Update all shards with stale=update_after

    • COUCHDB-3158: Fix a crash when connection closes for _update

    • : Default ssl settings cause a crash

    • COUCHDB-3164: Request fails when using _changes?feed=eventsource&heartbeat=30000

    • : Replicator doesn’t handle well writing documents to a target db which has a small max_document_size

    • COUCHDB-3173: Views return corrupt data for text fields containing non-BMP characters

    • : max_document_size setting can by bypassed by issuing multipart/related requests

    • COUCHDB-3178: Fabric does not send message when filtering lots of documents

    • : function_clause error when adding attachment to doc in _users db

    • COUCHDB-3184: couch_mrview_compactor:recompact/1 does not handle errors in spawned process

    • : fabric:open_revs returns multiple results when one of the shards has stem_interactive_updates=false

    • COUCHDB-3199: Replicator VDU function doesn’t account for an already malformed document in replicator db

    • : (mango) do not allow empty field names

    • COUCHDB-3220: Handle timeout in _revs_diff

    • : (Fix) HTTP code 500 instead of 400 for invalid key during document creation

    • COUCHDB-3231: Allow fixing users’ documents (type and roles)

    • : user context not passed down in fabric_view_all_docs

    • COUCHDB-3238: os_process_limit documentation wrong

    • : race condition in couch_server if delete msg for a db is received before open_result msg

    • COUCHDB-3245: Make couchjs -S option take effect again

    • : Include main-coffee.js in release artifact (broken CoffeeScript view server)

    • COUCHDB-3255: Conflicts introduced by recreating docs with attachments

    • : Don’t trap exits in couch_file

    • COUCHDB-3264: POST to _all_docs does not respect conflicts=true

    • : view response can ‘hang’ with filter and limit specified

    • COUCHDB-3271: Replications crash with ‘kaboom’ exit

    • : eof in couch_file can be incorrect after error

    • COUCHDB-3277: Replication manager crashes when it finds _replicator db shards which are not part of a mem3 db

    • : Validation function throwing unexpected json crashes with function_clause

    • COUCHDB-3289: handle error clause when calling fabric:open_revs

    • : Excessively long document IDs prevent replicator from making progress

    • COUCHDB-3293: Allow limiting length of document ID (for CouchDB proper)

    • : (mango) don’t crash with invalid input to built in reducer function

    • COUCHDB-3362: DELETE attachment on non-existing document creates the document, rather than returning 404

    • : Don’t crash compactor when compacting process fails.

    • COUCHDB-3367: Require server admin user for db/_compact and db_view_cleanup endpoints

    • : Fix mem3_shards under load

    • COUCHDB-3378: Fix mango full text detection

    • : Fix couch_auth_cache reinitialization logic

    • COUCHDB-3400: Notify couch_index_processes on all shards when ddoc updated

    • : race condition in mem3 startup

    • #511: (mango) Return false for empty list

    • : Return 409 to PUT attachment with non-existent rev

    • #623: Ensure replicator _active_tasks entry reports recent pending changes value

    • : Pass UserCtx to fabric’s all_docs from mango query

    • #631: fix couchdb_os_proc_pool eunit timeouts

    • : Make couch_event_sup:stop/1 synchronous

    • #645: Pass db open options to fabric_view_map for _view and _list queries on _users DB

    • : Fix couch_replicator_changes_reader:process_change

    • #649: Avoid a race when restarting an index updater

    • : Prevent a terrible race condition

    • #677: Make replication filter fetch error for _replicate return a 404

    • Fix CORS max_age configuration parameter via Access-Control-Max-Age

    • Chunk missing revisions before attempting to save on target (improves replication for very conflicted, very deep revision tree documents)

    • Allow w parameter for attachments

    • Return “Bad Request” when count in /_uuids exceeds max

    • Fix crashes when replicator db is deleted

    • Skip internal replication if changes already replicated