16.1. 2.3.x Branch
16.1.1. Upgrade Notes
- #1602: To improve security, there have been major changes in theconfiguration of query servers, SSL support, and HTTP global handlers:
- Query servers
Query servers are NO LONGER DEFINED in the .ini files, and can
no longer be altered at run-time.
The JavaScript and CoffeeScript query servers continue to be enabled
by default. Setup differences have been moved from default.ini to
the couchdb
and couchdb.cmd
start scripts respectively.
Additional query servers can now be configured using environment
variables:
- export COUCHDB_QUERY_SERVER_PYTHON="/path/to/python/query/server.py with args"
- couchdb
where the last segment in the environment variable (_PYTHON
) matches
the usual lowercase(!) query language in the design doclanguage
field (here, python
.)
Multiple query servers can be configured by using more environment
variables.
You can also override the default servers if you need to set command-
line options (such as couchjs
stack size):
- export COUCHDB_QUERY_SERVER_JAVASCRIPT="/path/to/couchjs /path/to/main.js -S <STACKSIZE>"
- couchdb
- Native Query Servers
The mango query server continues to be enabled by default. The Erlang
query server continues to be disabled by default. This change adds
a [native_query_servers] enable_erlang_query_server = BOOL
setting
(defaults to false
) to enable the Erlang query server.
If the legacy configuration for enabling the query server is detected,
that is counted as a true
setting as well, so existing configurations
continue to work just fine.
- SSL Support
Enabling SSL support in the ini file is now easier:
- [ssl]
- enable = true
If the legacy httpsd configuration is found in your ini file, this will
still enable SSL support, so existing configurations do not need to be
changed.
- HTTP global handlers
These are no longer defined in the default.ini file, but have been
moved to the couch.app context. If you need to customize your handlers,
you can modify the app context using a couchdb.config file as usual.
#1602: Also to improve security, the deprecated
os_daemons
andcouch_httpd_proxy
functionality has been completely removed ahead of the plannedCouchDB 3.0 release. We recommend the use of OS-level daemons such as runit, sysvinit,systemd, upstart, etc. to launch and maintain OS daemons instead, and the use ofa reverse proxy server in front of CouchDB (such as haproxy) to proxy access to otherservices or domains alongside CouchDB.#1543: The node-local (default port 5986)
/_restart
endpoint has beenreplaced by the clustered (default port 5984) endpoint/_node/$node/_restart
and/_node/_local/_restart
endpoints. The node-local endpoint has been removed.#1764: All python scripts shipped with CouchDB, including
couchup
and thedev/run
development cluster script, now specify and require Python 3.x.#1396: CouchDB is now compatible with Erlang 21.x.
#1680: The embedded version of
rebar
used to build CouchDB has beenupdated to the last version ofrebar2
available. This assists in building onnon-x86 platforms.
16.1.2. Version 2.3.0
16.1.2.1. Features
(Multiple) Clustered purge is now available. This feature restores the CouchDB 1.xability to completely remove any record of a document from a database. Conditionsapply; to use the feature safely, and for full details, read the completeClustered Purge documentation.
#1658: A new config setting is available, allowing an administrator toconfigure an initial list of nodes that should be contacted when a node boots up.Nodes in the
seedlist
that are successfully reached will be added to that node’s_nodes
database automatically, triggering a distributed Erlang connection andreplication of the internal system databases to the new node. This can be used insteadof manual config or the cluster setup wizard to bootstrap a cluster. The progress ofthe initial seeding of new nodes is exposed at theGET /_up
endpoint.Replication supports ipv6-only peers after updating ibrowse dependency.
#1708: The UUID of the server/cluster is once again exposed in the
GET /
response. This was a regression from CouchDB 1.x.#1722: Stats counts between job runs of the replicator are no longer reseton job restart.
#1195, #1742: CouchDB’s
_bulk_get
implementation now supportsthemultipart/mixed
andmultipart/related
content types if requested,extending compatibility with third-party replication clients.
16.1.2.2. Performance
#1409: CouchDB no longer forces the TCP receive buffer to a fixed sizeof 256KB, allowing the operating system to dynamically adjust the buffer size. Thiscan lead to siginificantly improved network performance when transferring largeattachments.
#1423: Mango selector matching now occurs at the shard level, reducing thenetwork traffic within a cluster for a mango query.
#1423: Long running operations at the node level could exceed the inter-nodetimeout, leading to a fabric timeout error in the logfile and a cancellation of thetask. Nodes can now ping to stop that from happening.
#1560: An optimization to how external data sizes of attachments wererecorded was made.
#1586: When cleaning up outdated secondary index files, the search is limitedto the index directory of a specific database.
#1593: The
couch_server
ETS table now has theread_concurrency
option set, improving access to the global list of open database handles.#1593: Messages to update the least-recently used (LRU) cache are notsent when the
[couchdb] update_lru_on_read
setting is disabled.#1625: All nodes in a cluster now run their own
rexi
server.
16.1.2.3. Bugfixes
#1484:
_stats
now correctly handles the case where a map function emitsan array of integers. This bug was introduced in 2.2.0.#1544: Certain list functions could return a
render_error
errorintermittently.#1550: Replicator
_session
support was incompatible with CouchDBinstallations using therequire_valid_user = true
setting.#1571: Under very heavy load, it was possible that
rexi_server
coulddie in such a way that it’s never restarted, leaving a cluster without the abilityto issue RPC calls - effectively rendering the cluster useless.#1574: The built-in
_sum
reduce function has been improved to checkif the objects being summed are not overflowing the view storage. Previously, therewas no protection for_sum
-introduced overflows.#1582: Database creation parameters now have improved validation, giving amore readable error on invalid input.
#1588: A missing security check has been restored for the noop
/db/_ensure_full_commit
call to restore database validation checks.#1591: CouchDB now creates missing shard files when accessing a databaseif necessary. This handles the situation when, on database creation, no nodes werecapable of creating any of the shard files required for that database.
#1568: CouchDB now logs a warning if a changes feed is rewound to 0. Thiscan help diagnose problems in busy or malfunctioning clusters.
#1596: It is no longer possible that a busy
couch_server
, under aspecific ordering and timing of events, will incorrectly trackopen_async
messages in its mailbox.#1601, #1654: CouchDB now logs better when an error causes it toread past the EOF of a database shard. The check for whether CouchDB is trying to readtoo many bytes has been correctly separated out from the error indicating it hasattempted to read past the EOF.
#1613: Local nodes are now filtered out during read repair operations.
#1636: A memory leak when replicating over HTTPS and a problem occurshas been squashed.
#1635:
/_replicate
jobs are no longer restarted if parameters haven’tchanged.#1612: JavaScript rewrite functions now send the body of the request tothe rewritten endpoint.
#1631: The replicator no longer crashes if the user has placed aninvalid VDU function into one of the
_replicator
databases.#1644, #1647: It is no longer possible to create illegally-nameddatabases within the reserved system space (
_
prefix.)#1650:
_bulk_get
is once again operational for system databases suchas_users
.#1652: Access to
/_active_tasks
is once again restricted to serveradmins only.#1662: The
couch_log
application no longer crashes when new, additionalinformation is supplied by a crashing application, or when any of its own children arerestarted.#1666: Mango could return an error that would crash the
couch_query_servers
application. This is no longer the case.#1655: Configuration of
ets_lru
inchttpd
now performs proper errorchecking of the specified config value.#1667: The
snappy
dependency has been updated to fix a memory allocationerror.#1683: Attempting to create a local document with an invalid revision nolonger throws a
badarg
exception. Also, when settingnew_edits
tofalse
and performing a bulk write operation, local documents are no longer written into thewrong btree. Finally, it is no longer possible to create a document with an emptyID during a bulk operation withnew_edits
set tofalse
.#1721: The
couchup
convenience script for upgrading from CouchDB 1.xnow also copies a database’s_security
object on migration.#1672: When checking the status of a view compaction immediately afterstarting it, the
total_changes
andchanges_done
fields are now immediatelypopulated with valid values.#1717: If the
.ini
config file is read only, an attempt to update theconfig through the HTTP API will now result in a propereacces
error response.#1603: CouchDB now returns the correct
total_rows
result when querying/{db}/_design_docs
.#1629: Internal load validation functions no longer incorrectly hold opena deleted database or its host process.
#1746: Server admins defined in the ini file accessing via HTTP API no longerresult in the auth cache logging the access as a miss in the statistics.
#1607: The replicator no longer fails to re-authenticate to open a remotedatabase when its session cookie times out due to a VDU function forbidding writesor a non-standard cookie expiration duration.
#1579: The compaction daemon no longer incorrectly only compacts a singleview shard for databases with a
q
value greater than 1.#1737: CouchDB 2.x now performs as well as 1.x when using a
_doc_ids
or_design_docs
filter on a changes feed.
16.1.2.4. Mango
16.1.2.5. Other
The 2.3.0 release also includes the following minor improvements:
Improved test cases:
- The Elixir test suite has been merged. These test cases are intended to replace theaging, unmaintainable JavaScript test suite, and help reduce our dependency onMozilla Spidermonkey 1.8.5. The test suite does not yet cover all of the tests thatthe JS test suite does. Once it achieves full coverage, the JS test suite will beremoved.
- Many racy test cases improved for reliable CI runs.
- The Makefile targets for
list-eunit-*
now work correctly on macOS. - #1732, #1733, #1736: All of the test suites run andpass on the Windows platform once again.
#1597: Off-heap messages, a new feature in Erlang 19+, can now be disabledper module if desired.
#1682: A new
[feature_flags]
config section exists for the purpose ofenabling or disabling experimental features by CouchDB developers.A narwhal! OK, no, not really. If you got this far…thank you for reading.