Release Notes CockroachDB Beta 2017-04-06

What's new in CockroachDB beta-20170406

 

Happy Thursday!

Highlights from this week's release include an expanded "Build a Ruby App with CockroachDB" tutorial that now features the ActiveRecord ORM.

You can download the new beta here.

Cheers,

The Cockroach Labs Team

-----------------------------------

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.

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
  • ROLLBACK TO SAVEPOINT is now allowed at any time, not only after receiving a “retry transaction” error. #14538
  • SHOW TRANSACTION ISOLATION and SHOW TRANSACTION PRIORITY are now only allowed during a transaction. #14491
  • 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

  • Command history no longer corrupts previous commands when normalizing them. #14496
  • The cockroach start 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

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

Performance Improvements

  • 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

Bug Fixes

  • 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
  • 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

Doc Updates

  • Expanded the Build a Ruby App with CockroachDB tutorial to feature the ActiveRecord ORM. #1234
  • Clarified the --store flag in the cockroach start documentation. #1243
  • Updated the build from source instructions to use a source tarball instead of the cockroach GitHub repository. The source tarball downloads faster and doesn’t need to be extracted in the GOPATH. Developers who want to contribute to CockroachDB should use the instructions in CONTRIBUTING.md instead. #1209

Contributors

This release includes 88 merged PRs by 22 authors. We would like to thank the following contributors from the CockroachDB community, especially first-time contributor Daniel Upton.

  • Christian Meunier
  • Daniel Upton

Some bugs have been observed when upgrading to this release from prior versions, so it has been withdrawn.

The bugs are being tracked at https://github.com/cockroachdb/cockroach/pull/14692 and https://github.com/cockroachdb/cockroach/issues/14700.