Skip to content

Latest commit

 

History

History
305 lines (277 loc) · 29.5 KB

v2.0-alpha.20180122.md

File metadata and controls

305 lines (277 loc) · 29.5 KB
title toc summary
What's New in v2.0-alpha.20180122
false
Additions and changes in CockroachDB version v2.0-alpha.20180122

January 22, 2018

Get future release notes emailed to you:

<script> hbspt.forms.create({ css: '', cssClass: 'install-form', portalId: '1753393', formId: '39686297-81d2-45e7-a73f-55a596a8d5ff', formInstanceId: 1, target: '.install-form-1' }); </script>

{{site.data.alerts.callout_danger}}A bug that could trigger range splits in a tight loop was discovered in this release, so this release has been withdrawn.{{site.data.alerts.end}}

Backwards-Incompatible Changes

  • Removed the obsolete kv.gc.batch_size cluster setting. #21070
  • Removed the COCKROACH_METRICS_SAMPLE_INTERVAL environment variable. Users that relied on it should reduce the value for the timeseries.resolution_10s.storage_duration cluster setting instead. #20810

General Changes

  • CockroachDB now proactively rebalances data when the diversity of the localities that a given range is located on can be improved. #19489
  • Clusters are now initialized with default .meta and .liveness replication zones with lower GC TTL configurations. #17628
  • CockroachDB now uses gRPC version 1.9.1 #21398

Build Changes

  • The build system now enforces a minimum version of Go, rather than enforcing a specific version of Go. Since the Go 1.x series has strict backward-compatibility guarantees, the old rule was unnecessarily restrictive. #21426

SQL Language Changes

  • The new SHOW CREATE SEQUENCE statement shows the CREATE SEQUENCE statement that would create a carbon copy of the specified sequence. #21208
  • The DROP COLUMN statement now drops CHECK constraints. #21203
  • The pg_sequence_parameters() built-in function is now supported. #21069
  • ON DELETE CASCADE foreign key constraints are now fully supported and memory bounded. #20064 #20706
  • ON UPDATE CASCADE foreign key constraints are now fully supported #21329
  • For improved troubleshooting, more complete and useful details are now reported to clients when SQL errors are encountered. #19793
  • The new SHOW SYNTAX statement allows clients to analyze arbitrary SQL syntax server-side and retrieve either the (pretty-printed) syntax decomposition of the string or the details of the syntax error, if any. This statement is intended for use in the CockroachDB interactive SQL shell. #19793
  • Enhanced type checking of subqueries in order to generalize subquery support. As a side-effect, fixed a crash with subquery edge cases such as SELECT (SELECT (1, 2)) IN (SELECT (1, 2)). #21076
  • Single-use common table expressions are now supported. #20359
  • Statement sources with no output columns are now disallowed. #20998
  • WHERE predicates that simplify to NULL no longer performs table scans. #21067
  • The experimental CREATE ROLE, DROP ROLE, SHOW ROLES, GRANT <role>, and REVOKE <role> statements are now supported as part of role-based access control. #21020 #20980 #21341
  • Improved the output of EXPLAIN to show the plan tree structure. #20697
  • OUTER interleaved joins are now supported. #20963
  • Added the rolreplication and rolbypassrls columns to the pg_catalog.pg_roles table. #20397
  • ARRAY values can now be cast to their own type. #19816
  • The || operator is now supported for JSONB. #20689
  • The CASCADE option is now required to drop an index that is used by Unique constraint. #20837
  • The BOOL type now matches PostgreSQL's list of accepted formats. #20833
  • The sql_safe_updates session variable now defaults to false unless the shell is truly interactive (using cockroach sql, -e not specified, standard input not redirected) and --unsafe-updates is not specified. Previously, sql_safe_updates would always default to true unless --unsafe-updates was specified. #20805
  • The errexit client-side option now defaults to false only if the shell is truly interactive, not only when the input is not redirected as previously. #20805
  • The display_format client-side option now defaults to pretty in every case where the output goes to a terminal, not only when the input is not redirected as previously. #20805
  • The check_syntax and smart_prompt client-side options, together with the interactive line editor, are only enabled if the session is interactive and output goes to a terminal. #20805
  • Table aliases are now permitted in RETURNING clauses. #20808
  • Added the SERIAL2, SERIAL4, and SERIAL8 aliases for the SERIAL type. #20776
  • NULL values are now supported in COLLATE expressions. #20795
  • The new crdb_internal.node_executable_version() built-in function simplifies rolling upgrades. #20292
  • The json_pretty(), json_extract_path(), jsonb_extract_path(), json_object(), asJSON(), jsonb_set(), json_build_object(), json_strip_nulls(), and json_each{_text}() built-in functions are now supported. #20702 #20520 #21015 #20234 #21010 #21019 #21335 #21044
  • The DISTINCT ON clause is now supported for SELECT statements. #20463
  • The output of EXPLAIN is now enhanced when applied to statements containing scalar sub-queries. #21305
  • The array_agg() built-in function is now supported in distributed queries. #21475
  • Removed the limit on transaction keys. There was formerly a limit of 100,000 keys. #21078
  • Improved the error message when a column reference is ambiguous. #21361
  • The new SHOW EXPERIMENTAL_REPLICA TRACE statement executes a query and returns which nodes served reads and writes. #21349
  • Multiplication between INTERVAL and FLOAT values, and between INTERVAL and DECIMAL values, is now fully supported. #21292
  • Reduced the size of entries stored in the system.rangelog table by not storing empty JSON fields. #21318
  • The ALTER TABLE SCATTER statement now randomizes the locations of the leases for all ranges in the referenced table or index. #21431
  • When using HTTPS storage for IMPORT, a custom CA for HTTPS storage providers can now be specified via the cloudstorage.http.custom_ca cluster setting. This is also used when accessing custom s3 export storage endpoints. #21358 #21404
  • Storage of timeseries data within the cluster can be disabled by setting the new timeseries.storage.enabled cluster setting to false. This is recommended only if you exclusively use a third-party tool such as Prometheus for timeseries monitoring. See this FAQ for more details. #21314
  • For compatibility with PostgreSQL and related tools:
    • Parsing of the COMMENT ON syntax is now allowed. #21063
    • The following built-in functions are now supported: pg_catalog.pg_trigger(), pg_catalog.pg_rewrite(), pg_catalog.pg_operator(), pg_catalog.pg_user_mapping(), pg_catalog.foreign_data_wrapper(), pg_get_constraintdef(), inet_client_addr(), inet_client_port(), inet_server_addr(), inet_server_port(). #21065 #20788
    • Missing columns have been added to information_schema.columns, and the pg_catalog.pg_user() virtual table has been added. #20788
    • A string cast to regclass is interpreted as a possibly qualified name like db.name. #20788
    • Rendered columns for built-in functions are now titled by the name of the built-in function. #20820

Command-Line Changes

  • Client cockroach commands that use SQL (cockroach sql, cockroach node ls, etc.) now print a warning if the server is running an older version of CockroachDB than the client. Also, this and other warning messages are now clearly indicated with the "warning:" prefix. #20935
  • Client-side syntax checking performed by cockroach sql when the check_syntax option is enabled has been enhanced for forward-compatibility with later CockroachDB versions. #21119
  • The \? client-side command of cockroach sql now prints out a description of each option. #21119
  • The --unsafe-updates of cockroach sql was renamed to --safe-updates. The default behavior is unchanged: The previous flag defaulted to false; the new flag defaults to true. #20935
  • The cockroach sql command no longer fails when the server is running a version of CockroachDB that does not support the sql_safe_updates session variable. #20935

Admin UI Changes

  • Added graphs of node liveness heartbeat latency, an important internal signal of health, to the Distributed dashboard. #21002
  • Capacity Used is now shown as "-" instead of 100% when the UI can't load the real data from the server. #20824
  • Removed a redundant rendering of the GC pause time from the CPU Time graph. #20802
  • The Databases page now reports table sizes that are better approximations to actual disk space usage. #20627
  • Added a system table to allow operators to designate geographic coordinates for any locality. This is for use with upcoming cluster visualization functionality in the Admin UI. #19652
  • When a new version of CockroachDB is available, the Admin UI now links you to the documentation explaining how to upgrade your cluster. #19718
  • Job descriptions are now expandable. #21333

Bug Fixes

  • Fixed the debug compact command to compact all sstables. #21293
  • Fixed tuple equality to evaluate correctly in the presence of NULL elements. #21230
  • Fixed a bug where the temporary directory was being wiped on failed CockroachDB restart, causing importing and DistSQL queries to fail. #20854
  • The "JSON" column in the output of EXPLAIN(DISTSQL) is now properly hidden by default. It can be shown using SELECT *, JSON FROM [EXPLAIN(DISTSQL) ...]. #21154
  • EXPLAIN queries with placeholders no longer panic. #21168
  • The --safe-updates flag of cockroach sql can now be used effectively in non-interactive sessions. #20935
  • Fixed a bug where non-matching interleaved rows were being inner-joined with their parent rows. #20938
  • Fixed an issue where seemingly irrelevant error messages were being returned for certain INSERT statements. #20841
  • Crash details are now properly copied to the log file even when a node was started with --logtostderr as well as in other circumstances when crash details could be lost previously. #20839
  • It is no longer possible to log in as a non-existent user in insecure mode. #20800
  • The BIGINT type alias is now correctly shown when using SHOW CREATE TABLE. #20798
  • Fixed a scenario where a range that is too big to snapshot can lose availability even with a majority of nodes alive. #20589
  • Fixed BETWEEN SYMMETRIC, which was incorrectly considered an alias for BETWEEN. Per the SQL99 specification, BETWEEN SYMMETRIC is like BETWEEN, except that its arguments are automatically swapped if they would specify an empty range. #20747
  • Fixed a replica corruption that could occur if a process crashed in the middle of a range split. #20704
  • Fixed an issue with the formatting of unicode values in string arrays. #20657
  • Fixed detection and proper handling of certain variations of network partitions using server-side RPC keepalive in addition to client-side RPC keepalive. #20707
  • Prevented RPC connections between nodes with incompatible versions. #20587
  • Dangling intents are now eagerly cleaned up when AmbiguousResultErrors are seen. #20628
  • Fixed the return type signature of the JSON #>> operator and array_positions() built-in function. #20524
  • Fixed an issue where escaped characters like \A and \\ in LIKE/ILIKE patterns were not handled properly. #20600
  • Fixed an issue with (NOT) (I)LIKE pattern matching on _...% and %..._ returning incorrect results. #20600
  • Fixed a small spelling bug that made it such that a DOUBLE PRECISION specified type would erroneously display as a float. #20727
  • Fixed a crash caused by null collated strings. #20637
  • Fixed a problem that could cause spurious garbage collection activity, in particular after dropping a table. #21407
  • Fixed incorrect logic in lease rebalancing that prevented leases from being transferred #21430
  • INSERT/UPDATE/DELETE ... RETURNING statements used with the "statement data source" syntax (e.g., SELECT * FROM [INSERT INTO ... RETURNING ...]) no longer ever commit the transaction, causing errors for the higher-level query. #20847
  • Fixed a crash caused by a column being backfilled in an index constraint. #21308
  • Fixed a bug in which ranges could get stuck if the uncommitted raft log grew too large #21356
  • The setval() built-in function no longer lets you set a value outside the MAXVALUE/MINVALUE of a SEQUENCE. #20973

Performance Improvements

  • Improved the efficiency of scans with joins and certain complex WHERE clauses containing tuple equality. #21288
  • Improved the efficiency scans for certain WHERE clauses. #21217
  • Reduced per-row overhead in distsql query execution. #21251
  • Added support for distributed execution of UNION queries. #21175
  • Improved performance for aggregation and distinct operations by arena allocating "bucket" storage. #21160
  • Distributed execution of UNION ALL queries is now supported. #20742
  • Reduced the fixed overhead of commands sent through Raft by 40% by only sending lease sequence numbers instead of sending the entire lease structure. #20953
  • When tables are dropped, the space is now reclaimed in a more timely fashion. #20607
  • Increased speed of except and merge joins by avoiding an unnecessary allocation. #20759
  • Improved rebalancing to make thrashing back and forth between nodes much less likely, including when localities have very different numbers of nodes. #20709
  • Improved performance of DISTINCT queries by avoiding an unnecessary allocation. #20755 #20750
  • Significantly improved the efficiency of DROP TABLE and TRUNCATE. #20601
  • Improved performance of low-level row manipulation routines. #20688
  • Raft followers now write to their disks in parallel with the leader. #19229
  • Significantly reduced the overhead of SQL memory accounting. #20590
  • Equality joins on the entire interleave prefix between parent and (not necessarily direct) child interleaved tables are now faster. #19853
  • Improved the performance of scans that need to look at non-indexed columns. #21459
  • Improved the performance of all scans that encounter a large number of versions per key, and the low-level reverse scan throughput by up almost 4x when there are a few versions per key.. #21438
  • Queries on tables with many columns are now more efficient. #21450
  • Queries that only need to read part of a table with many columns are now more efficient. #21450
  • Improved low-level scan performance by 15-20% by disabling redundant checksums. #21395
  • Re-implemented low-level scan operations in C++, doubling performance for scans of contiguous keys/rows. #21395
  • Reduced the occurrence of ambiguous errors when a node is down. #21376
  • Sped up distsql query execution by "fusing" processors executing on the same node together. #21254

Enterprise Edition Changes

  • Incremental backups of a database after a table or index was added is now supported.#21170
  • When using HTTPS storage for BACKUP or RESTORE, a custom CA for HTTPS storage providers can now be specified via the cloudstorage.http.custom_ca cluster setting. This is also used when accessing custom s3 export storage endpoints. #21358 #21404
  • Bulk writes are now synced to disk periodically to ensure more predictable performance. #20449

Doc Updates

Contributors

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

  • Yang Yuting
  • Dmitry Saveliev
  • Jincheng Li
  • Mohamed Elqdusy
  • 何羿宏
  • louishust