Document-oriented NoSQL database CouchDB is now available in version 3.0, which, according to its makers, addresses “most of the shortcomings that our otherwise happy users have reported over the past years” and prepares the ground for a major change in 4.0.
Feature-wise, the new version is the first to let users create databases with partitions, allowing the system to place documents into the same shard range. This is meant to help with performance, scalability, and efficiency when querying secondary indexes.
Databases can now also be re-sharded without users having to put them offline, there is a new subsystem in place ensuring secondary indexes like the text search one are kept up to date, and a new IO Queue subsystem implementation has been added. The capability to link against SpiderMonkey 60 has been added to have the system provide better support for newer ECMAScript versions, and search component Dreyfus is now part of the package.
Some of the most profound changes to the way CouchDB can be used in version 3.0 might be down to the horror stories of incognizant folks’ NoSQL databases suddenly popping up on the net without any good safety measures in place. To make sure this doesn’t happen with CouchDB, its makers now have declared the end of the “era of the Admin Party”.
With “closed by default” being CouchDB’s new security philosophy, users will now have to provide an admin password before the database server starts. Compared to earlier versions, newly created databases are only accessible by server admin users, reducing the risk of accidentally opening them up to anyone. If there’s no admin configured, the system will throw an error message.
Since the new approach might cause trouble to monitoring setups, the CouchDB team added a new system role called _metrics to the project. Users with this status are allowed to access the /_stats and /_systems endpoints (but that’s as far as their permissions go). Like that, no admin passwords need to be stored in such a metrics service which is a security plus, while observability stays unaffected.
Looking forward, CouchDB plans to switch its storage and clustering subsystem to FoundationDB to help solve some clustering-related issues people keep running into. Version 4.0 will be the first release based on the new foundation, but in order to make the transition easier, the project devs have included some preparatory measures. They for example added a new limit to the max_document_size, which is now 8MB instead of 4GB, which was more of a theoretical limit.
A full list of changes can be found in the documentation. Users who like the sound of the new features but still work with versions from the 1.x series, should also consult the upgrade notes. They’ll have to migrate to v2.3.1 first, to get their databases and indexes in order before jumping onto the new release.