Apr 13, 2017

Get future release notes emailed to you:

Binaries

Backwards-Incompatible Changes

  • The implementation of indexing for collated string columns has changed. Any secondary indexes containing collated strings must be dropped before upgrading to this version and then re-created after upgrading. Note that this applies only to secondary indexes, not to primary indexes. #14528

  • Any row with a -0 FLOAT or DECIMAL value in a primary key or index must be deleted before upgrading to this version and then re-inserted after upgrading. Otherwise, the row containing -0 will show up during table scans, but it will not be possible to delete it or select it as part of an index scan.

    If you suspect -0 values are present but don’t know where, an alternative approach is to use cockroach dump to back up tables with FLOAT or DECIMAL columns, drop the tables before upgrading, and then use the backup files to recreate the tables and indexes after upgrading. #14528

  • The experimental_strptime and experimental_strftime functions are deprecated and will be removed in a future release. If you are currently using these functions, please let us know here.

  • Several undocumented environment variables have been removed. #14786 #14797
  • Clusters which have used the COCKROACH_PROPOSER_EVALUATED_KV environment variable require special care when upgrading to this release; contact us for more information. #14773

Build Changes

  • Building CockroachDB from source no longer uses $GOPATH/bin for anything except the final binary produced by make install. #14629
  • Developers should use make generate instead of go generate to ensure the correct tool versions are used. #14672

SQL Language Changes

  • SQL variables can now be reset to their default values with the RESET statement or SET x TO DEFAULT. #14105
  • Schema changes within transactions are now restricted. Certain combinations of schema changes with other statements (which would previously hang) will now return an error. It is recommended that DDL statements be issued outside of transactions, or as the only statement within a transaction. #14368
  • Subqueries are now supported as the source of UPDATE statements. #14611
  • Timestamp parsing now understands the format used by JDBC’s setTimestamp. #14712
  • INTERVAL values larger than a month now use the suffix mon instead of m (which is also used for minutes). Intervals can now be parsed from strings containing decimals and negative numbers. #14534
  • INTERVAL values now support multiplication and division by FLOAT values. #14614
  • Arithmetic operations on integers now check for overflow. #14682
  • Comparisons involving tuples with non-identical types are now allowed whenever the comparison of the individual elements would be allowed. #14674
  • The implementation of the experimental_strptime function is now consistent across platforms. #14801
  • BETWEEN now supports any combination of types that would be supported by individual comparison operators. #14754
  • Handling of untyped literals during overload resolution is now more consistent. #14593
  • ROLLBACK TO SAVEPOINT is now allowed at any time, not only after receiving a “retry transaction” error. #14538
  • CREATE TABLE AS SELECT now returns the number of rows affected to the SQL client driver. #13187
  • ALTER TABLE .. ADD CONSTRAINT can now be used to add a self-referential foreign key. #14711
  • The RETURNING NOTHING clause can now be used outside of a transaction, although it does not provide any performance benefit in this case. #14551
  • SQL user names are now required to start with a letter, contain only letters, numbers, and underscores, and be no longer than 63 characters. #14525
  • The BYTES type name is now reported as bytea in pg_catalog.pg_type for compatibility with PostgreSQL. #14495
  • The PostgreSQL type IO functions (like int8in, int8out, int8send, and int8recv) have dummy implementations for compatibility with some ORMs. #14529

Command-Line Interface Changes

  • The cockroach zone set command now recognizes the special zone names .meta, .timeseries, and .system to set configurations for system metadata. #14740
  • The cockroach start command no longer uses the COCKROACH_PORT environment variable; the port must be set on the server’s command line (similar to --host and other flags). #14612
  • The cockroach quit command is now more robust. #14775
  • Command history no longer corrupts previous commands when normalizing them. #14496
  • Commands entered as a single line are now saved together in the history. #14846
  • The config file generated by cockroach gen haproxy now enables health checks for the server. #14624
  • The --store and --log-dir flags now reject arguments starting with ~ that were not expanded by the shell. #14746

Admin UI Changes

  • The Node List page has been improved. #14395
  • A new node-id metric with labels for the node’s address is now exported for use in external monitoring systems. #14544
  • The /debug/ pages are now accessible only from localhost by default. Set the environment variable COCKROACH_REMOTE_DEBUG=any when running the server to allow remote access. #14647 #14675

Performance Improvements

  • A new, more efficient format is now used for indexes with the STORING clause. Existing indexes will still work, but will need to be dropped and recreated to get the benefits of the new format. #14758
  • A single TimestampCache is now shared by all replicas on a store, providing better control over memory usage and better support for large transactions. #14489
  • Reduced memory used by the TimestampCache. #14516 #14514
  • Replica garbage collection is now much more efficient. #14391
  • Adding and dropping columns now uses the distributed SQL engine. #14331
  • The health of inter-node connections is now monitored using HTTP/2 ping frames instead of regular RPCs. This ensures that HTTP flow control cannot cause a connection to be considered unhealthy. #14424
  • The limit on the number of concurrent inter-node RPCs has been increased. #14785
  • The bandwidth used by range snapshots is now limited to 2MB/sec by default to reduce impact on live traffic. #14718
  • If a single row grows larger than the configured maximum range size, the split queue will no longer spin trying to split the range repeatedly. #14654
  • Several kinds of tracing and logging have been disabled by default. #14677

Bug Fixes

  • Fixed an issue with UPDATE and DELETE on tables with STORING indexes. Indexes affected by this bug will need to be dropped and recreated. #14643
  • BETWEEN now handles NULL in the same way as other comparison operators. #14686
  • Fixed a bug with comparisons involving division with a constant negative divisor. #14702
  • INSERT ON CONFLICT DO UPDATE no longer uses an error-prone optimization. The UPSERT statement is now faster than the equivalent INSERT ON CONFLICT DO UPDATE statement. #14485
  • Schema changes now abort more reliably when encountering errors. #14025
  • Joining nodes of two different clusters is now detected more reliably. #14475
  • Fixed a panic during prepared UPDATE statements. #14481
  • FLOAT and DECIMAL values in primary keys and indexes now consider 0 and -0 equal (although the sign will correctly be retained). #14528
  • DECIMAL values in primary keys and indexes no longer have zeros truncated. If a secondary index contains a DECIMAL value with trailing zeros, you can drop and re-create the index to have the value returned correctly when the index is used. #14528
  • Fixed a crash when assigning with the DEFAULT keyword in UPDATE statements. #14640

Doc Updates

Contributors

This release includes 215 merged PRs by 27 authors. We would like to thank the following contributors from the CockroachDB community, especially first-time contributors Amos Bird and Daniel Upton.

  • Amos Bird
  • Christian Meunier
  • Daniel Upton
  • songhao


Yes No