What's New in v20.2.8

April 23, 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:v20.2.8

SQL language changes

  • RESTORE now re-validates restored indexes if they were restored from an incremental backup that was taken while the index was being created. #63314
  • Fixed an ST_Segmentize panic when the number of segments to generate exceeded math.MaxInt64. #63759

Operational changes

  • Added a new setting to set the garbage collector intent age threshold: kv.gc.intent_age_threshold. #62788

DB Console changes

Bug fixes

  • The kv.closed_timestamp.target_duration setting set to 0 will now disable routing requests to follower replicas. #62441
  • Added support for usernames with special characters to cockroach userfile. #60020
  • Fixed an internal error that could occur during planning for queries involving tables with many columns and at least one inverted index. The error, "estimated distinct count must be non-zero", was caused by an invalid pointer access in the cardinality estimation code. #62561
  • Fixed an error where writing files to cockroach userfile would sometimes result in an error claiming that the userfile table already existed. #62547
  • Fixed a deficiency in the replication layer that could result in ranges becoming unavailable for prolonged periods of time (hours) when a write burst occurred under system overload. While unavailable, the range status page for the affected range would show a last index much larger than the committed index and no movement in these indexes on a quorum of the replicas. Note that this should be distinguished from the case in which enough replicas are offline to constitute a loss of quorum, where the replication layer can not make progress due to the loss of quorum itself. #61848
  • Fixed a bug where tables that were created by CockroachDB v19.x or older that included foreign key constraints and were backed up with the 'revision_history' option would be malformed when restored by a v20.x cluster if the call to RESTORE used the AS OF SYSTEM TIME option. #62600
  • Fixed "types cannot be matched for WITH RECURSIVE" error in cases where we can cast the type in the initial expression. #62825
  • Fixed an error where CockroachDB could encounter an internal error in rare circumstances when executing queries via the vectorized engine that operate on columns of BOOL, BYTES, INT, and FLOAT types that have a mix of NULL and non-NULL values. #62916
  • Fixed a rare bug that could cause a node to consume excessive CPU and become unresponsive. #62907
  • Fixed an internal error that could occur during planning when a query used the output of an UPDATE's RETURNING clause, and one or more of the columns in the RETURNING clause were from a table specified in the FROM clause of the UPDATE (i.e., not from the table being updated). #62961
  • Queries that reference tables with GEOMETRY or GEOGRAPHY inverted indexes and that call geospatial functions with constant NULL values cast to a type, like NULL::GEOMETRY or NULL::FLOAT8, no longer error. This bug was present since v20.2. #63005
  • Dropping a foreign key that was added in the same transaction no longer triggers an internal error. This bug has been present since at least version v20.1. #62880
  • Fixed a rare error "unexpected type *tree.DOidWrapper for AsJSON". #63232
  • Fixed a bug where index backfill data may have been missed by BACKUP in incremental backups. #63265
  • Fixed a bug where lease acquisitions of descriptors in an offline state may starve out bulk operations such BACKUP or RESTORE. #63229
  • Fixed a bug in user-defined schemas whereby the dropping of any schema may prevent creation of schemas with the name of the database and may corrupt already existing schemas of that name. #63397
  • Incremental cluster backups may have missed data written to tables while they were OFFLINE. In practice, this could happen if RESTORE or IMPORT were running across incremental backups. This has now been fixed. #63392
  • Fixed a rare issue that could cause replica divergence. These issues would be reported by the replica consistency checker, typically within 24 hours of occurrence, which would cause nodes to terminate. #63474
  • CockroachDB now uses the existing primary key to validate indexes built for ALTER PRIMARY KEY changes. #63585
  • Fixed an index out of range error that could occur when crdb_internal_mvcc_timestamp was selected as part of a view. It is now possible to select crdb_internal_mvcc_timestamp as part of a view as long as it is aliased with a different name. #63630
  • Error gracefully when attempting to run ST_Segmentize and generating more than MaxInt64 points on a GEOGRAPHY. #63759
  • Fixed a bug which could cause errors in DROP DATABASE CASCADE when the database contained temporary views in other sessions which were not explicitly marked as TEMPORARY. #63781
  • Fixed an internal error that could occur when executing queries using an inverted index. The error was an index out of range error, and could occur in rare cases when a filter or join predicate contained at least two JSON, ARRAY, GEOMETRY or GEOGRAPHY expressions that were combined with AND. #63826
  • IMPORT and RESTORE jobs are now restored as reverting so that they clean up after themselves. Previously, some of the writes of the jobs while they were running may have been missed by BACKUP. #63765

Performance improvements

  • Improved logic in determining the configuration for data to avoid expensive work when there are a large number of user-defined schemas. #62356
  • Improved performance of reverting IMPORT INTO jobs that import into empty tables. #63224

Change Data Capture

  • Kafka and cloud storage sinks use a memory monitor to limit the amount of memory that can be used in internal buffers. #63633
  • Connected the changefeed memory monitor to the parent SQL monitor to ensure that changefeeds do not try to use more memory than is available to the SQL server. #63410
  • Made the Kafka library used in changefeeds configurable via the kafka_sink_config option to enable latency vs. throughput configuration. #63362

Contributors

This release includes 45 merged PRs by 22 authors.

YesYes NoNo