What's New in v21.1.6

July 20, 2021

Get future release notes emailed to you:

Downloads

Warning:
The CockroachDB executable for Windows is experimental and not suitable for production deployments. Windows 8 or higher is required.

Docker image

icon/buttons/copy
$ docker pull cockroachdb/cockroach:v21.1.6

General changes

  • Switched the release-21.1 branch to point to a fork of the Google Cloud SDK at version 0.45.1 with an upstream bug fix. #66808

Enterprise edition changes

  • Improved the internal buffering of changefeeds to be robust to bursts in traffic which exceed the throughput to the sink. #67205
  • Incremental backups to a cloud storage location that already contains large existing backups now find their derived destination without listing as many remote files. #67286

Operational changes

  • Added logs for important events during the server draining/shutdown process: (1) log when the server closes an existing connection while draining, (2) log when the server rejects a new connection while draining, and (3) log when the server cancels in-flight queries after waiting for the server.shutdown.query_wait duration to elapse while draining. #66874

DB Console changes

Bug fixes

  • CockroachDB now allows a node with lease preferences to drain gracefully. #66712
  • Fixed a panic that could occur in the optimizer when executing a prepared plan with placeholders. This could happen when one of the tables used by the query had computed columns or a partial index. #66833
  • Fixed a bug that caused graceful drain to call time.sleep multiple times, which cut into time needed for range lease transfers. #66851
  • Reduced CPU usage of idle cockroach processes. #66894
  • Fixed an error that backup would produce in some full backups with revision history. Previously, some full backups would erroneously produce an error in the form of batch timestamp <some_timestamp> must be after replica GC threshold <some_other_timestamp>. #66904
  • CockroachDB now avoids interacting with decommissioned nodes during DistSQL planning and consistency checking. #66950
  • Changefeeds no longer interact poorly with large, abandoned transactions. Previously, this combination could result in a cascade of work during transaction cleanup that could starve out foreground traffic. #66813
  • Changefeeds now properly invalidate cached range descriptors and retry when encountering decommissioned nodes. #67013
  • Fixed a bug where metrics pages would lose their scroll position on chart data updates. #67089
  • Fixed a bug which caused internal errors when running an IMPORT TABLE statement with a virtual computed column to import a CSV file. This bug has been present since virtual computed columns were introduced in v21.1.0. #67043
  • Previously, the CLI would attribute some of the time spent running schema changes to network latency. This has now been fixed. Additionally, verbose timings in the CLI now also show time spent running schema changes in a separate bucket. #65719
  • Fixed a statement buffer memory leak when using suspended portals. #67372
  • Changefeeds on tables with array columns now support Avro. #67433
  • Avro encoding now supports collated string types. #67433
  • ENUM columns can now be encoded in Avro changefeeds #67433
  • Avro changefeeds now support BIT and VARBIT columns. #67433
  • INTERVAL columns are now supported in Avro changefeeds. #67433

Performance improvements

  • CockroachDB now continues to generate histograms when table statistics collection reaches memory limits, instead of disabling histogram generation. #67057
  • The optimizer now prefers performing a reverse scan over a forward scan + sort if the reverse scan eliminates the need for a sort and the plans are otherwise equivalent. Ihis was previously the case in most cases, but some edge cases with a small number of rows have been fixed. #67388
  • When choosing between index scans that are estimated to have the same number of rows, the optimizer now prefers indexes for which it has higher certainty about the maximum number of rows over indexes for which there is more uncertainty in the estimated row count. This helps to avoid choosing suboptimal plans for small tables or if the statistics are stale. #67388

Contributors

This release includes 47 merged PRs by 34 authors. We would like to thank the following contributors from the CockroachDB community:

  • joesankey (first-time contributor)
YesYes NoNo