What's New in v19.1.9

May 12, 2020

This page lists additions and changes in v19.1.9 since v19.1.8.

Warning:

Cockroach Labs has discovered a bug relating to incremental backups, for CockroachDB v19.1.0 - v19.1.11. If a backup coincides with an in-progress index creation (backfill), RESTORE, or IMPORT, it is possible that a subsequent incremental backup will not include all of the indexed, restored or imported data.

For more information, including other affected versions, see Technical Advisory 63162.

Get future release notes emailed to you:

Downloads

Docker image

icon/buttons/copy
$ docker pull cockroachdb/cockroach:v19.1.9

Backward-incompatible changes

  • Previously, the phase of server shutdown responsible for range lease transfers to other nodes would give up after 10,000 attempts of transferring replica leases away, regardless of the value of server.shutdown.lease_transfer_wait. The limit of 10,000 attempts has been removed, so that now only the maximum duration server.shutdown.lease_transfer_wait applies. #47698
  • The textual error and warning messages displayed by cockroach quit under various circumstances have been updated. Meanwhile, the message "ok" remains as indicator that the operation has likely succeeded. #47698
  • cockroach quit now prints out progress details on its standard error stream, even when --logtostderr is not specified. Previously, nothing was printed on standard error. Scripts that wish to ignore this output can redirect the stderr stream. #47698

Security updates

General changes

  • Previously, the phase of server shutdown responsible for range lease transfers to other nodes had a hard timeout of 5 seconds. This patch makes this timeout configurable via the new cluster setting server.shutdown.lease_transfer_wait. #47698

SQL language changes

  • It is now possible to use GRANT and REVOKE to add users to the admin role without a valid license. This change aims to enable use of the Admin UI and other privileged features without a license. #45396
  • The type checking code now prefers aggregate overloads with string inputs if there are multiple possible candidates due to arguments of unknown type. #46902
  • Added a new "unimplemented" error when attempting to ADD CONSTRAINT with the EXCLUDE USING syntax. #46912
  • Added support for using CREATE INDEX ... INCLUDE (col1, col2, ...), which is an alias that PostgreSQL uses that is analogous to our STORING (col1, col2, ...) syntax. #46912
  • Added support for parsing the REINDEX syntax, which results in an "unimplemented" error that explains that REINDEXing is not required in CockroachDB. #46912
  • CockroachDB now parses the CREATE INDEX CONCURRENTLY and DROP INDEX CONCURRENTLY syntaxes, which return errors when used. #46808

Command-line changes

  • cockroach debug zip now avoids creating invalid zip files if some of its requests encounter an error. #46637
  • The time that cockroach quit waits client-side for the node to drain (remove existing clients and push range leases away) is now configurable via the command-line flag --drain-wait. Note that separate server-side timeouts also apply separately; check the server.shutdown.* cluster settings for details. #47698
  • It is now possible to drain a node without shutting down the process, using cockroach node drain. This makes it easier to integrate with service managers and orchestration: it now becomes safe to issue cockroach node drain and then separately stop the service via a process manager or orchestrator. Without this new mode, there is a risk to misconfigure the service manager to auto-restart the node after it shuts down via quit, in a way that's surprising or unwanted. The new command node drain also recognizes the new --drain-wait flag. #47698
  • The default value of the parameter --drain-wait for cockroach quit has been increased from 1 minute to 10 minutes, to give more time for nodes with thousands of ranges to migrate their leases away. #47698
  • The commands cockroach quit and cockroach node drain now report a "work remaining" metric on their standard error stream. The value reduces until it reaches 0, to indicate that the graceful shutdown has completed server-side. An operator can now rely on cockroach node drain to obtain confidence of a graceful shutdown prior to terminating the server process. #47698

Admin UI changes

  • Metrics relating to SQL transaction restarts and rollbacks are now properly captured and exported. #46273

Bug fixes

  • Fixed a "cannot map variable" error in some rare cases involving joins. #44860
  • Fixed incorrect de-duplication of impure expressions (like gen_random_uuid) in projections and default values. #44916
  • Fixed an internal error that could occur when NULLIF was called with one null argument. #45391
  • It is now possible to create inverted indexes on columns whose names are mixed-case. #45678
  • Previously, drivers that did not truncate trailing zeroes for decimals in the binary format ended up having inaccuracies of up to 10^4 during the decode step. Fixed this error by truncating the trailing zeroes as appropriate. This fixes known incorrect decoding cases with Postgrex in Elixir. #45671
  • Fixed a name resolution error that could occur when a common table expression (CTE) was referenced in the SELECT list of a query using the syntax <cte-name>.<col-name>. #45782
  • Previously, CockroachDB could crash when computing window functions with RANGE mode of framing when one of the bounds was either of offset PRECEDING or offset FOLLOWING type when there were NULL values in the single column from ORDER BY clause. Additionally, in RANGE mode bounds 0 PRECEDING and 0 FOLLOWING could be handled incorrectly. Now this has been fixed. #45806
  • Fixed an internal error that could occur in the optimizer when a WHERE filter contained at least one correlated subquery and one non-correlated subquery. #46168
  • CockroachDB now properly supports using --url with query options (e.g., application_name) without specifying sslmode. The default of sslmode=disable is assumed in that case. #46480
  • Fixed a bug where operations on an index that contained a collated string in descending order would fail. #46579
  • Fixed an incorrect query result that could occur when a scalar aggregate was called with a null input. #46902
  • Fixed a data race on AST nodes for SELECT statements that include a WINDOW clause. It is unclear whether this could have resulted in incorrect results being returned for these queries. #47177
  • Fixed incorrect results that could occur when casting negative intervals or timestamps to type decimal. #47524
  • Previously, CockroachDB was incorrectly releasing memory used by hash aggregation. This could lead to a crash (which was more likely when hash aggregation had store on the order of 100k of groups) and is now fixed. #47520
  • Fixed a bug that could lead to data corruption or data loss if a replica was both the source of a snapshot and was being concurrently removed from the range. This scenario is rare, but possible. #48317

Contributors

This release includes 27 merged PRs by 10 authors.


Yes No

Yes No