Release Notes for CockroachDB v2.2.0-alpha.20181217

release-notes

(Maria Toft) #1

Docker image

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

    General changes

    • The default disk size on Kubernetes has been changed from 1 GiB to 100 GiB. #32428
    • A new cluster setting (sql.defaults.conn_results_buffer_size) can be used to control server-side buffering of results. #32366

    Enterprise edition changes

    • Disabled range merges on tables that are being restored or imported into. #32538
    • Added timeseries metrics for debugging CHANGEFEED performance issues. #32241
    • Added the option to supply Google Cloud Storage credentials on a per-statement basis with the query parameter credentials. #32544
    • It is now possible to use AWS S3 temporary credentials for BACKUP/RESTORE and IMPORT/EXPORT using the AWS_SESSION_TOKEN parameter in the URL. #32455

    SQL language changes

    • Users can customize the auto-retry savepoint name used by the SAVEPOINT command by setting the force_savepoint_restart session variable. For example, SET force_savepoint_restart=true; BEGIN; SAVEPOINT foo will now function as desired. This session variable may also be supplied as part of a connection string to support existing code that assumes that arbitrary savepoint names may be used. #31971
    • The names supplied to a SAVEPOINT command are now properly treated as SQL identifiers. For example, SAVEPOINT foo and SAVEPOINT FOO are now equivalent statements. #31971
    • It is now an error to run ALTER TABLE ... DROP STORED on a column which is not actually a computed, stored column. Previously, this statement would be a successful no-op. #32279
    • Many queries containing a correlated EXISTS subquery with a generator function can now be decorrelated and executed successfully. Previously, these queries caused a decorrelation error. #31922
    • IMPORT now uses larger integer sizes when converting unsigned MySQL integer columns to their signed cockroach counterparts. #32481
    • An ALTER TABLE statement to add a foreign key constraint now automatically creates the necessary index if the referencing table is empty and the index does not already exist. #32234
    • Queries involving COLLATE expressions are now supported by the cost-based optimizer. #32500
    • Some categories of SELECT queries that return 0 or 1 rows (namely, queries by a PK, a unique index, or LIMIT 1 queries) are now guaranteed to not return retryable errors when running as implicit transactions (i.e., outside of a BEGIN...COMMIT block). #32401
    • Added support for AS OF SYSTEM TIME with the CREATE STATISTICS statement. #32643
    • CockroachDB now accepts ordinary string values for placeholders of type BPCHAR, for compatibility with PostgreSQL clients that use them. #32654
    • CockroachDB now supports associating comments to SQL tables using PostgreSQL's COMMENT ON TABLE syntax. This also provides proper support for pg's pg_catalog.pg_description and built-in function obj_description(). #32442
    • The SHOW TABLES statement now supports printing out table comments using the optional phrase WITH COMMENT, e.g SHOW TABLES FROM mydb WITH COMMENT. #32442
    • The INT type is now treated as an alias for INT8. #32831
    • Added an experimental_optimize_updates flag, which uses the cost-based optimizer to plan UPDATE statements when set to true. #32774

    Command-line changes

    • cockroach sql and other commands that print query results and query execution latency will now exclude the time required to prepare the display client-side from the latency measurement. #32663
    • cockroach workload now includes the kv and ycsb generators. #32719
    • Added the cockroach debug merge-logs command to combine logs from multiple nodes. #32790

    Admin UI changes

    • All existing uses of the Loading component now properly surface data errors. Previously, data errors weren't consistently surfaced. #32464
    • The Node map now uses an equirectangular projection. #32617

    Bug fixes

    • Fixed a panic on UPDATE RETURNING * during a schema change. #32188
    • Fixed a panic when expression contains both a correlated and uncorrelated subquery. #32443
    • Fixed a panic on UPSERT in the middle of a schema change adding a non-nullable column. #32585
    • Fixed an error when configuring NOT NULL computed columns. #32585
    • Fixed a deadlock when using ALTER TABLE VALIDATE CONSTRAINT in a transaction with a schema change. #32772
    • Prevented non-superusers from seeing other user's sessions and queries via the ListSessions and ListLocalSessions status server API methods. #32253
    • Avoided occasional unnecessary Raft snapshots after range splits. #31875
    • CHANGEFEEDs emitting into Kafka now more quickly notice new partitions. #32297
    • Ensured that space in the temporary storage directory is reclaimed more promptly. #32385
    • CHANGEFEEDs with the experimental_avro option now work with column WIDTHs and PRECISIONs. #32474
    • CockroachDB now properly rejects queries that use an invalid function (e.g., an aggregation) in the SET clause of an UPDATE statement. #32505
    • Prevented VALUES clauses from returning incorrect results for certain special OID values. #32494
    • CockroachDB now reports an unimplemented error when a WHERE clause is used after INSERT ... ON CONFLICT. #32556
    • Fixed an issue where calling CREATE STATISTICS on a large table could cause the server to crash due to running out of memory. #32614
    • CockroachDB now properly handles foreign key cascading actions SET DEFAULT and SET NULL in SHOW CREATE and cockroach dump. #32589
    • Fixed a node data loss bug that occurs when a disk becomes temporarily full. #32605
    • Fixed a panic caused by WITH ORDINALITY in some cases. #32596
    • Dates no longer have a time component in their text encoding over the wire. #32144
    • Intervals now match Postgres in their text encoding over the wire. #32144
    • Intervals no longer sometimes lose 1ns of precision. This only happened rarely due to floating point inaccuracy. #32144
    • Corrected the pgwire encoding for arrays and tuples. #32144
    • Corrected the binary decimal encoding for NaN. #32144
    • Prevented a panic when running certain subqueries that get planned in a distributed fashion. #32652
    • Fixed a panic that could occur during or after a data import on Windows. #32664
    • Lookup joins now properly preserve ordering for outer joins. Prior to this fix, LEFT JOIN queries under specific conditions could produce results which did not respect the ORDER BY clause. #32317
    • CockroachDB now again enables admin users, including root, to list all user sessions besides their own. #32629
    • Fixed a panic involving json_agg and window functions. #32716
    • CockroachDB no longer panics when encountering an internal error related to invalid entries in the output of SHOW SESSIONs. #32713
    • Resolved a cluster degradation scenario that could occur during IMPORT/RESTORE operations, manifested through a high number of pending Raft snapshots. #32594
    • CockroachDB now properly evaluates CHECK constraints after a row conflict in INSERT ... ON CONFLICT when the CHECK constraint depends on a column not assigned by DO UPDATE SET. #32779
    • CockroachDB now properly records statistics for sessions where the value of application_name is given by the client during initialization instead of SET. #32754
    • cockroach workload run no longer includes data-only generators #32720
    • Fixed a bug where metadata about contended keys was inadvertently ignored, allowing for a failure in transaction cycle detection and transaction deadlocks in rare cases. #32773
    • Fixed a bug where SCRUB would erroneously report that index keys were out of order. #32908

    Performance improvements

    • Removed locking when reading physical time. #32225
    • CockroachDB now users a faster randomness source to generate transaction IDs. #32238
    • Implemented more efficient execution for some queries with GROUP BY or DISTINCT ON and an ORDER BY clause where an index with a suitable ordering is not available. #32307
    • CockroachDB now rewrites the Raft entry cache to optimize for access patterns, reduce lock contention, and reduce memory footprint. #32618
    • Re-enabled usage of RocksDB FlushWAL, which is a minor performance improvement for synchronous RocksDB write operations. #32674
    • Replaced the Replica latching mechanism with a new optimized data structure that improves throughput, especially under heavy contention. #32865

    Build changes

    • ncurses is now linked statically so that the cockroach binary no longer requires a particular version of the ncurses shared library to be available on deployment machines. #32959

    Doc updates

    Contributors

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

    • Jaewan Park (first-time contributor)
    • Joe Harlow (first-time contributor)
    • Mayank Oli
    • shakeelrao (first-time contributor)