RethinkDB 2.3 introduces a users and permissions system, TLS encrypted connections, a
Windows beta, and numerous improvements to the ReQL query language. ReQL improvements
include up to 10x better performance for distributed joins, and a new fold
command that
allows you to implement efficient stateful transformations on streams.
Read the blog post for more details.
Compatibility
Data files from RethinkDB version 1.16 onward will be automatically migrated.
As with any major release, back up your data files before performing the upgrade.
If you're upgrading from RethinkDB 1.15.x or earlier, please read the
data migration guide to find out about the required migration steps.
RethinkDB 2.3.0 servers cannot be mixed with servers running RethinkDB 2.2.x or earlier
in the same cluster.
Managing password-protected clusters
If you migrate a cluster from a previous version of RethinkDB and have an auth_key
set,
the auth_key
is turned into the password for the "admin"
user. If no auth_key
is
set, a new "admin"
user with an empty password is automatically created during
migration.
RethinkDB 2.3 adds a new restriction when adding a server to an existing cluster. If
the existing cluster has a non-empty password set for the "admin"
user, a new server
is only allowed to join the cluster if it has a password set as well. This is to avoid
insecure states during the join process. You can use the new --initial-password auto
command line option for joining a new server or proxy to a password-protected cluster.
The --initial-password auto
option assigns a random "admin"
password on startup,
which gets overwritten by the previously configured password on the cluster once the join
process is complete.
API-breaking changes
- The
eqJoin
command no longer returns results in the order of its first input. You can
pass in the new{ordered: true}
option to restore the previous behavior. - Operations on geospatial multi-indexes now emit duplicate results if multiple index
keys of a given document match the query. You can append the.distinct()
command in
order to restore the previous behavior. - Changefeeds on queries of the form
orderBy(...).limit(...).filter(...)
are no longer
allowed. Previous versions of RethinkDB allowed the creation of such changefeeds, but
did not provide the correct semantics. - The commands
r.wait
,r.rebalance
andr.reconfigure
can no longer be called on the
globalr
scope. Previously, these commands defaulted to the"test"
database
implicitly. Now they have to be explicitly called on either a database or table object.
For example:r.db("test").wait()
,r.db("test").rebalance()
, etc. - The
{returnChanges: "always"}
option with theinsert
command will now add
{error: "..."}
documents to thechanges
array if the insert fails for some
documents. Previously failed documents were simply omitted from thechanges
result. - The special values
r.minval
andr.maxval
are no longer permitted as return values
of secondary index functions.
Deprecated APIs
- The JavaScript
each
function is deprecated in favor ofeachAsync
. In a
future release,each
will be turned into an alias ofeachAsync
. We recommend
converting existing calls of the form.each(function(err, row) {})
into the
eachAsync
equivalent.eachAsync(function(row) {}, function(err) {})
.
You can read more abouteachAsync
in the documentation. - The
auth_key
option toconnect
in the official drivers is deprecated in favor of
the newuser
andpassword
options. For now, a providedauth_key
value is mapped
by the drivers to a password for the"admin"
user, so existing code will keep
working.
Discontinued packages
We no longer provide packages for the Debian oldstable distribution 7.x (Wheezy).
When compiling from source, the minimum required GCC version is now 4.7.4.
New features
- Added support for user accounts, user authentication, and access permissions. Users can
be configured through the"users"
system table. Permissions can be configured through
either the new"permissions"
system table or through thegrant
command. (#4519) - Driver, intracluster and web UI connections can now be configured to use TLS
encryption. For driver and intracluster connections, the server additionally supports
certificate verification. (Linux and OS X only, #5381) - Added beta support for running RethinkDB on Windows (64 bit only, Windows 7 and up).
(#1100) - Added a
fold
command to allow stateful transformations on ordered streams. (#3736) - Added support for changefeeds on
getIntersecting
queries. (#4777)
Improvements
- Server
- The
--bind
option can now be specified separately for the web UI (--bind-http
),
client driver port (--bind-driver
) and cluster port (--bind-cluster
). (#5467) - RethinkDB servers now detect non-transitive connectivity in the cluster and raise a
"non_transitive_error"
issue in the"current_issues"
system table when detecting
an issue. Additionally, the"server_status"
system table now contains information on
each server's connectivity in the newconnected_to
field. (#4936) - Added a new
"memory_error"
issue type for the"current_issues"
system table that
is displayed when the RethinkDB process starts using swap space. (Linux only) (#1023) - Reduced the number of scenarios that require index migration after a RethinkDB
upgrade. Indexes no longer need to be migrated unless they use a custom index
function. (#5175) - Added support for compiling RethinkDB on Alpine Linux. (#4437)
- Proxy servers now print their server ID on startup. (#5515)
- Raised the maximum query size from 64 MB to 128 MB. (#4529)
- Increased the maximum number of shards for a table from 32 to 64. (#5311)
- Implemented a
--join-delay
option to better tolerate unstable network conditions
(#5319) - Added an
--initial-password
command line option to secure the process of adding new
servers to a password-protected cluster. (#5490) - Implemented a new client protocol handshake to support user authentication. (#5406)
- The
- ReQL
- Added an
interleave
option to theunion
command to allow merging streams in a
particular order. (#5090) - Added support for custom conflict-resolution functions to the
insert
command.
(#3753) - The
insert
command now returns changes in the same order in which they were passed
in when thereturnChanges
option is used. (#5041) - Added an
includeOffsets
option to thechanges
command to obtain the positions
of changed elements in anorderBy.limit
changefeeds. (#5334) - Added an
includeTypes
option to thechanges
command that adds atype
field to
every changefeed result. (#5188) - Made geospatial multi-indexes behave consistently with non-geospatial multi-indexes
if a document is indexed under multiple matching keys.getIntersecting
and
getNearest
now return duplicates if multiple index keys match. (#3351) - The
and
,or
andgetAll
commands can now be called with zero arguments.
(#4696, #2588) - Disallowed calling
r.wait
,r.rebalance
andr.reconfigure
on the global scope to
avoid confusing semantics. (#4382) - The
count
andslice
commands can now be applied to strings. (#4227, #4228) - Improved the error message from
reconfigure
if too many servers are unreachable.
(#5267) - Improved the error message for invalid timezone specifications. (#1280)
- Added an
- Performance
- Web UI
- The web UI now uses the
conn.server()
command for getting information about the
connected server. (#5059)
- The web UI now uses the
- All drivers
- JavaScript driver
- Python driver
- Added a
"gevent"
loop type to the Python driver. (#4433) - Printing a cursor object now displays the first few results. (#5331)
- Removed the dependency on
tar
for therethinkdb restore
andrethinkdb dump
commands. (#5399) - Added a
--tls-cert
option to therethinkdb import
,rethinkdb export
,
rethinkdb dump
,rethinkdb restore
andrethinkdb index-rebuild
commands to enable
TLS connections. (#5330) - Added
--password
and--password-file
options to therethinkdb import
,
rethinkdb export
,rethinkdb dump
,rethinkdb restore
and
rethinkdb index-rebuild
commands to connect to password-protected servers. (#5464) - Added a
--format ndjson
option torethinkdb export
that allows exporting tables
in a newline-separated JSON format. (#5101) - Made
rethinkdb dump
rethinkdb restore
andrethinkdb import
able to write to
stdout and load data from stdin respectively. (#5525, #3838) r.min
,r.max
,r.sum
,r.avg
andr.distinct
now accept an array argument
(#5494)
- Added a
- Java driver:
- Made it easier to publish the driver on local Ivy and Maven repositories. (#5054)
Bug fixes
- Server
- Fixed a crash with the message
[cmp != 0]
when querying withr.minval
or
r.maxval
values inside of an array. (#5542) - Fixed in issue that caused orphaned tables to be left behind when deleting a database
through the"db_config"
system table. (#4465) - Fixed a crash when trying to restore a backup from a version of RethinkDB that is too
new. (#5104) - Fixed a bug in data migration from RethinkDB 2.0.x and earlier. (#5570)
- Fixed a race condition causing server crashes with the message
Guarantee failed: [!pair.first.inner.overlaps(region.inner)]
when rebalancing a
table while simultaneously opening new changefeeds. (#5576) - Fixed an issue causing backfill jobs to remain in the
jobs
system table even after
finishing. (#5223)
- Fixed a crash with the message
- ReQL
- Web UI
- Fixed the "The request to retrieve data failed" error when having an orphaned table
whose database has been deleted. (#4985) - Fixed the maximum number of shards display for clusters with more than 32 servers.
(#5311) - Fixed an empty "Connected to" field when accessing the web UI through a RethinkDB
proxy server. (#3182)
- Fixed the "The request to retrieve data failed" error when having an orphaned table
- JavaScript driver
- Fixed the behavior of
cursor.close
when there are remaining items in the buffer.
(#5432)
- Fixed the behavior of
- Python driver
- Ruby driver
- Fixed the handling of the error generated for over-sized queries. (#4771)
Contributors
Many thanks to external contributors from the RethinkDB community for helping
us ship RethinkDB 2.3. In no particular order:
- Aaron Rosen (@aaronorosen)
- @crockpotveggies
- Daniel Hokka Zakrisson (@dhozac)
- Igor Lukanin (@igorlukanin)
- @janisz
- Joshua Bronson (@jab)
- Josh Hawn (@jlhawn)
- Josh Smith (@Qinusty)
- Marshall Cottrell (@marshall007)
- Mike Mintz (@mikemintz)
- Niklas Hambüchen (@nh2)
- Qian Jin (@QianJin2013)
- Taylor Murphy (@tayloramurphy)
- Vladislav Botvin (@Darrrk)
- Adam Grandquist (@grandquista)
- @bakape
- Bernardo Santana (@bsantanas)
- Bheesham Persaud (@bheesham)
- Christopher Cadieux (@ccadieux)
- Chuck Bassett (@chucksmash)
- Diney Wankhede (@dineyw23)
- Heinz Fiedler (@heinzf)
- Mark Yu (@vafada)
- Mike Krumlauf (@mjkrumlauf)
- Nicolás Santángelo (@nicosantangelo)
- Samuel Volin (@untra)
- Stefan de Konink (@skinkie)
- Tommaso (@raspo)