Release Notes for CockroachDB v2.2.0-alpha.20181118


(jessica) #1

Alpha release: CockroachDB v2.2.0-alpha.20181118

Docker image update

  • $ docker pull cockroachdb/cockroach:v2.2.0-alpha.20181118

Backward-incompatible changes

  • CockroachDB no longer supports the B'abcde' notation to express byte array literals. This notation now expresses bit array literals like in PostgreSQL. The b'...' notation remains for byte array literals. #28807
  • The normalized results of certain timestamp + duration operations involving year or month durations have been adjusted to agree with the values returned by PostgreSQL. #31146
  • The CHANGEFEED experimental-avro option has been renamed experimental_avro. #31838
  • Timezone abbreviations, such as EST, are no longer allowed when parsing or converting to a date/time type. Previously, an abbreviation would be accepted if it were an alias for the session's timezone. #31758

General changes

  • Load-based splitting is now enabled by default. In conjunction, the range_min_bytes setting in the .default replication zone is set to a higher value to prevent ranges from unnecessarily being considered for merging. #31413
  • Added a Kubernetes configuration that shows how to use certificates generated outside of the Kubernetes-orchestrated CockroachDB cluster. #27921
  • Added a Fluentd configuration for external logging of a Kubernetes-orchestrated CockroachDB cluster. #26685

SQL language changes

  • The EXPERIMENTAL_RELOCATE statement no longer temporarily increases the number of replicas in a range more than one above the range's replication factor, preventing rare edge cases of unavailability. #29684
  • The output of SHOW JOBS now reports ongoing jobs first in start time order, then completed jobs in finished time order. The running_status column becomes NULL when the status cannot be determined. #30917
  • The output of SHOW ZONE CONFIGURATIONS now only shows the zone name and the SQL representation of the config. #30985
  • The range log and system events logs now automatically purge records older than 30 and 90 days, respectively. This can be adjusted via the server.rangelog.ttl and server.eventlog.ttl cluster settings. #30913
  • In cases such as '2018-01-31'::TIMESTAMP + '1 month', where an intermediate result of February 31st needs to be normalized, previous versions of CockroachDB would advance to March 3. Instead, CockroachDB now "rounds down" to February 28th to agree with the values returned by PostgreSQL. This change also affects the results of the generate_sequence() function when used with timestamps. #31146
  • Updated the output of SHOW ZONE CONFIGURATIONS. Also, unset fields in zone configurations now inherit parent values. #30611
  • If diagnostics reporting is enabled, attempts to use CREATE/DROP SCHEMA, DEFERRABLE, CREATE TABLE (LIKE ...), and CREATE TABLE ... WITH are now collected as telemetry to gauge demand for these currently unsupported features. #31635
  • If diagnostics reporting is enabled, the name of SQL built-in functions are now collected upon evaluation errors. #31677
  • If diagnostics reporting is enabled, attempts by client apps to use the unsupported "fetch limit" parameter (e.g. via JDBC) are now collected as telemetry to gauge support for this feature. #31637
  • The IMPORT format (file) syntax is deprecated in favor of IMPORT format file. Similarly, IMPORT TABLE ... FROM format (file) is deprecated in favor of IMPORT TABLE ... FROM format file. #31263
  • For compatibility with PostgreSQL, it is once again possible to use the keywords FAMILY, MINVALUE, MAXVALUE, INDEX, and NOTHING as table names, and the names "index" and "nothing" are once again accepted in the right-hand side of SET statement assignments. #31731
  • Renamed the first column name returned by SHOW STATISTICS to statistics_name. #31927
  • CockroachDB now accepts a wider variety of date, time, and timestamp formats. #31758
  • The new experimental_vectorize session setting, when enabled, causes columnar operators to be planned instead of row-by-row processors, when possible. #31354
  • CockroachDB now supports the BIT and VARBIT (BIT VARYING) bit array data types like PostgreSQL. Currently, only the bit array literal notation with a capital B (e.g., B'10001') is supported; the notation with a small b (e.g., b'abcd') continues to denote byte arrays as in previous versions of CockroachDB. #28807
  • Added the array_to_json built-in function. #29818

Command-line changes

  • The cockroach cert create-client now offers the --also-generate-pkcs8-key flag for writing a client key in PKCS#8 format. #29008
  • The client-side option smart_prompt now controls whether cockroach sql and cockroach demo use the current transaction state to offer a multi-line entry at the start of new transactions. #31630
  • The cockroach sql and cockroach demo commands now recognize the commands exit and quit to terminate the shell. #31915
  • The cockroach debug estimate-gc command now allows users to specify TTL period, with a default of 24 hours. #31402

Admin UI changes

  • Improved the layout of the Cluster Overview page for large clusters with many nodes and ranges. #31512
  • Added the current node ID to the Advanced Debugging page to help identify the current node when viewing the web UI through a load balancer. #31835
  • The Non-Table Cluster Data section of the Databases page now includes all non-table data types. Previously, this section only showed Time Series data. #31830

Bug fixes

  • Hash functions with NULL input now return NULL. #29822
  • Generated sequences now respect the statement_timeout session variable. #31083
  • IS OF (...) expressions no longer report arrays with different element types as being the same. #31393
  • Fixed a bug where Raft proposals could get stuck if forwarded to a leader who could not itself append a new entry to its log. #31408
  • The confkey column of pg_catalog.pg_constraint no longer includes columns that were not involved in the foreign key reference. #31610
  • Fixed a small memory leak when running distributed queries. #31736
  • Fixed a bug in the cost-based optimizer that sometimes prevented passing ordering requirements through aggregations. #31754
  • Fixed a bug that caused transactions to unnecessarily return a "too large" error. #31733
  • CHANGEFEEDs now escape Kafka topic names, when necessary. #31596
  • Fixed a bug that would incorrectly cause JSON field access equality comparisons to be true when they should be false. #31751
  • Fixed a bug that sometimes caused invalid results or an "incorrectly ordered stream" error with streaming aggregations. #31825
  • Fixed a mismatch between lookup join planning and execution, which could cause queries to fail with the error "X lookup columns specified, expecting at most Y". #31792
  • Prevented a performance degradation related to overly aggressive Raft log truncations that could occur during RESTORE or IMPORT operations. #31914
  • EXPLAIN ANALYZE plans no longer show the processor with ID 0's stats in the Response box. #31941
  • Fixed rare deadlocks during IMPORT, RESTORE, or BACKUP. #31963
  • Fixed a panic caused by incorrectly encoded Azure credentials. #31984
  • The cost-based optimizer no longer chooses the wrong index for a scan because of incorrect selectivity estimation. #31937
  • Prepared statements that bind temporal values now respect the session's timezone setting. Previously, bound temporal values were always interpreted as though the session time zone were UTC. #31758
  • Prevented a stall in the processing of Raft snapshots when many snapshots are requested at the same time. #32053
  • CHANGEFEEDs now spend dramatically less time flushing Kafka writes #32060
  • Fixed a bug that caused some queries with DISTINCT ON and ORDER BY with descending columns to return an error incorrectly. #31976
  • Fixed a bug that caused queries with GROUP BY or DISTINCT ON to return incorrect results or an "incorrectly ordered stream" error. Also improved performance of some aggregations by utilizing streaming aggregation in more cases. #31976
  • Fixed bit array wire encoding in binary format. #32091
  • Fixed a bug that caused transactions to appear partially committed. CockroachDB was sometimes claiming to have failed to commit a transaction when some (or all) of its writes were actually persisted. #32166
  • Prevented long stalls that can occur in contended transactions. #32211
  • The graphite metrics sender now collects and sends only the latest data point instead of all data points since startup. #31829

Performance improvements

  • Improved the performance of AS OF SYSTEM TIME queries by letting them use the table descriptor cache. #31716
  • Within a transaction, when performing a schema change after the table descriptor has been modified, accessing the descriptor should be faster. #30934
  • Improved the performance of index data deletion. #31326
  • The cost-based optimizer can now determine more keys in certain cases involving unique indexes, potentially resulting in better plans. #31662
  • Reduced the amount of allocated memory by pooling allocations of rocksDBBatch and RocksDBBatchBuilder objects. #30523
  • Cache zone configuration values to avoid repetitive deserialization. #30143

Contributors

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

  • Jan Owsiany (first-time contributor)
  • M-srivatsa (first-time contributor)
  • Mayank (first-time contributor)
  • Mayank Oli (first-time contributor)
  • Mo Firouz (first-time contributor)
  • Sankt Petersbug (first-time contributor)
  • Vijay Karthik
  • changangela (first-time contributor)
  • hueypark (first-time contributor)
  • neeral