August 09, 2021
This page lists additions and changes in v21.1.7 since v21.1.6.
- For a comprehensive summary of features in v21.1, see the v21.1 GA release notes.
- To upgrade to v21.1, see Upgrade to CockroachDB v21.1.
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
$ docker pull cockroachdb/cockroach:v21.1.7
Security updates
- The
--cert-principal-map
flag passed tocockroach
commands now allows the certificate principal name to contain colons. #67810
General changes
- Added a new cluster setting (
kv.transaction.reject_over_max_intents_budget
) that controls the behavior of CockroachDB when a transaction exceeds the locks-tracking memory budget set by thekv.transaction.max_intents_bytes
cluster setting. Ifkv.transaction.reject_over_max_intents_budget
is set totrue
, CockroachDB rejects the query that would push its transaction over the memory budget with an error (error code 53400 - "configuration limit exceeded"). Transactions that don't track their locks precisely are potentially destabilizing for the cluster since cleaning up locks can take up considerable resources. Transactions that change many rows have the potential to run into this memory budget issue. #67967
SQL language changes
- The remote DistSQL flows are now eagerly canceled if they were queued up and the query was canceled. #66331
- Added a new cluster setting (
changefeed.slow_span_log_threshold
) that allows setting a cluster-wide default for slow span logging. #68106 - Added a new session variable (
enable_copying_partitioning_when_deinterleaving_table
) which will change the behavior ofALTER PRIMARY KEY
when performing a change which retains the same primary key but removes anINTERLEAVE INTO
clause. When this variable is set totrue
and anALTER PRIMARY KEY
is run that only removes anINTERLEAVE INTO
clause, the partitioning and zone configuration which applied to the root of the interleave will not be applied to the new primary index. The default value forenable_copying_partitioning_when_deinterleaving_table
is equal to the value set for the new cluster settingsql.defaults.copy_partitioning_when_deinterleaving_table.enabled
. #68114
Operational changes
- Histogram metrics now store the total number of observations over time. #68106
DB Console changes
- Fixed a bug causing the Summary Panel on the Overview Dashboard to flicker. #67365
- Fixed a bug preventing a redirect to the originally-requested DB Console page after user login. #67858
- User can now see time series metrics for disk spilling on the Advanced Debug page. #68112
- Fixed color mismatch of node status badge on the Cluster Overview page. #68056
- Chart titles on the Replication Dashboard were previously falsely labeled as "per Store" but were in fact "per Node". This bug is now fixed. #67847
Bug fixes
- Fixed a bug causing the
ST_GeneratePoints
built-in function to return a garbage value or an error if an empty geometry or negative nPoints input is given. #67580 - Fixed a bug where
DROP DATABASE
could return errors if the database contained temporary views in use in an another session. #67172 - Fixed a storage-level bug where Pebble would occasionally create excessively large SSTables, causing poor compaction performance and high read-amplification. This was especially likely after a manual offline compaction. #67610
- Correlated subqueries that couldn't be decorrelated and that have their own subqueries are now executed correctly when supported. Note that it is an edge case of an edge case, so it's unlikely that users have hit this bug (it was found by the randomized testing). #67570
- Fixed very rare, unexpected "index out of bounds" error from the vectorized engine when evaluating a
CASE
operator. #67779 - Catching up Raft followers on the Raft log is now more efficient in the presence of many large Raft log entries. This helps avoid situations where Raft leaders struggle to retain leadership while catching up their followers. #67127
- Fixed a bug that allowed rows to be inserted into a table with a
CHECK
constraint that always evaluated tofalse
(e.g.,CHECK (false)
). This bug was present since version 21.1.0. #67341 - Fixed a bug causing changefeeds to sometimes get stuck. #67968
- Previously, CockroachDB nodes would crash whenever the cluster setting
sql.trace.txn.enable_threshold
was changed to a non-zero value. The bug was introduced in 21.1.0. #68027 - Fixed a deadlock that could occur when many replicas were rapidly queued for removal. #65859
- Fixed two bugs which affected geospatial queries with the
st_distance
function. The first bug caused errors for filters of the formst_distance(g1, g2, use_spheroid) = 0
. The second could cause incorrect results in some cases; it incorrectly transformed filters of the formst_distance(g1, g2) = 0
wheng1
andg2
were geographies tost_instersects(g1, g2)
. This is not a valid transformation becausest_distance
makes spheroid-based calculations by default whilest_intersects
only makes sphere-based calculations. #67392 - Fixed a bug causing a prepared statement to incorrectly reuse the query plan of a different prepared statement that had similar, but not identical type hints. #67688
- Fixed an issue with statistics estimation in the optimizer that could cause it to over-estimate the number of rows for some expressions and thus choose a sub-optimal plan. This issue could happen when multi-column statistics were used in combination with histograms, the query contained a predicate on two or more columns where the columns were highly correlated, and the selected values were very common according to the histograms. #67998
- Previously, CockroachDB could encounter an internal error or crash when performing a cast of
NULL
JSON
value to Geography or Geometry types. Now this is fixed. #67902 INSERT
andUPDATE
statements which operate on larger rows can now be split into batches using thesql.mutations.mutation_batch_byte_size
setting. #67958- A rare bug that could result in a crash while creating a debug.zip file has been fixed. The bug was only possible to hit if a debug.zip file was captured during a period of rapid lease movement. #67728
- Previously the
GRANT
andREVOKE
commands would incorrectly handle role names. CockroachDB treats role names as case-insensitive, but these commands were incorrectly handling the names. Now,GRANT
andREVOKE
normalize the names and are case-insensitive. #67901
Performance improvements
- Vectorized flows can use less memory when sending and receiving data to the network. #67609
- Range merges are no longer considered if a range has seen significant load over the previous 5 minutes, instead of being considered as long as a range had low load over the previous second. This change improves stability, as load-based splits will no longer rapidly disappear during transient throughput dips. #65362
- A new cluster setting
sql.defaults.optimizer_improve_disjunction_selectivity.enabled
enables more accurate selectivity estimation of query filters withOR
expressions. This improves query plans in some cases. This cluster setting is disabled by default. #67730
Contributors
This release includes 47 merged PRs by 26 authors.