Riak TS Release Notes

Released February 21, 2017.

Riak TS 1.5.2 is a bug fix release of TS 1.5.1. You can read the full release notes for 1.5.1 and 1.5.0 below.


  • [Issue 1625/PR 1626] LevelDB query files were being named by concatenating table fields, which could cause errors when the filename exceeded the limit permitted by the OS. qry_buffers now generates small file names for temporary tables to avoid file names being created by stringing field names together.
  • [PR 1627] When no data was received in the first two query chunks the TotalQueryData / TotalQueryRows caused problems because it would divide by zero. It is now prevented from dividing by zero when there is no data in the first two query chunks.
  • [PR 1609] A bug caused the projected query size of queries with a LIMIT clause to be incorrectly computed, because the LIMIT value was used as the number of chunks in the calculations rather than the number of rows. The LIMIT value is now used as the number of rows in the calculations.
  • [PR 1609] The logic of the maximum query data size check has been fixed. Previously, queries in which LIMIT was big but the WHERE range was small were cancelled.
  • [PR 1622] The query size is now properly estimated for aggregate queries. Grouping queries will grow the result set to the number of unique values in the selection. In the extreme case of grouping by a column of all-unique values, its size will be the size of the entire selection.
  • [PR 1618] The sorting order of NULLS has been corrected to conform to SQL Standard. This fix impacts the order logic of ORDER BY for columns with nulls.

TS 1.5.1

Released January 24, 2017.

Riak TS 1.5.1 is a bug fix release of TS 1.5.0. You can read the full release notes for 1.5.0 below.


  • CREATE TABLE now waits for cluster metadata to propagate to all nodes before activating the table, which makes it ready for queries once the command is completed. [PR 1577]
  • Query filters are now used in start/end key. With this change, filters on the local key are put into the start/end keys to reduce the range that eLevelDB has to cover. [PR 1594]


  • [PR 1581] A WHERE clause filtered on the quantum column, that used the = operator, would sometimes return a Neither upper or lower time bounds were specified in the query error.
  • [PR 1583] The configuration property name for the maximum number of quanta allowed in a query was initially using the incorrect key and overriding configured values. This removes the 1000 cap on quanta size.
  • [PR 1590] Fix for queries not returning results for tables using DESC on the local key, which could occur under some table schemas.

TS 1.5.0

Released December 20, 2016.

Riak TS 1.5.2 expands its SQL implementation. It includes additional SELECT query clauses: ORDER BY and LIMIT. It also includes DELETE for a single record. TS 1.5 also includes ASC and DESC keywords in table schema definition, and better usage of the NULL keyword in WHERE clause conditions and INSERT statements.

TS 1.5.2 adds SHOW CREATE TABLE to review the SQL statement used to create the table. This statement is useful for re-creating your table from a testing to a deployment cluster, or to another data-center.

Data storage of unstructured (binary) or opaque (JSON) data has also gotten a little easier in TS 1.5 with the introduction of a BLOB data type.

Updates in TS 1.5 include multi-line paste functionality, built-in help for SQL commands, and enhanced error handling in riak shell.

Riak TS has significantly improved performance, thanks to streamlining of the on-disk encoding format and increased parallelization of record decoding. These updates have focused on improvement of SQL query latency, and result in typical speedups of 2-4x for large queries, particularly for data sets that are distributed around the cluster.

New Features


  • The timestamp type is now able to be used as an argument in aggregate functions. [riak_ql PR 146 & riak_ql PR 147]
  • You can now see the Status field of your TS table when you use SHOW TABLES. [PR 1514 and PR 1176]
  • Introduced the following new parameters in riak.conf. See the TS configuration docs for details. [PR 1505]
    • riak_kv.query.timeseries.max_returned_data_size
    • riak_kv.query.timeseries.max_running_fsms
    • riak_kv.query.timeseries.qbuf_root_path
    • riak_kv.query.timeseries.maximum_query_queue_length


  • Object size limitations, as set in riak.conf, have been decreased. object.size.warning_threshold has been decreased from a default of 5MB to 50kB. object.size.maximum has been decreased from 50MB to 500kB. [PR 1505 & PR 1218]
  • If a bucket type property contains a ddl property we infer that it’s a time series table. New defaults have been also been added in the event they are not specified. [riak_core PR 870]
  • The maximum number of index FSMs used to serve TS queries is now configurable. [PR 1550]
  • Write-once conflict resolution has been changed to be more predictable. It is now based on timestamp rather than SHA-1 hash on value part. [PR 1512]
  • LevelDB has been updated to version 2.0.33 [eleveldb PR 231]
  • LZ4 is now the default compression for LevelDB. [leveldb PR 164 & eleveldb PR 208]
  • Updated the default value for riak_kv.query.timeseries.max_quanta_span. See the TS configuration docs for details. Note: due to a bug in the code, the max_quanta_span is capped at 1000. [PR 1505]
  • The default value for OFFSET is [ ]. [PR 1546]


  • [Issue 1418/PR 1544 & PR 1204] A bad error atom type was causing the protobuf and TTB services to crash. Error reporting for overload and other types of error conditions have been added.
  • [riak_shell Issue 33/riak_shell PR 59] When unknown crashes occurred server-side, riak shell would get the report and crash itsef. Now, riak shell does not crash upon receiving unknown server-side crashes, and instead prompts you to report the bug to Riak.
  • [riak_shell PR 68, riak_shell PR 70, & PR 1239] Unicode in SQL could crash riak shell.
  • [riak_ql PR 148] It was possible to create a Riak TS table without a local key. Doing so would result in the local key becoming an exact copy of the partition key, meaning the quantum would be listed in-full rather than in a plain field name. This caused many breaks and bugs. The local key is now required, and a table creation will be unsuccessful without it.
  • [PR 1479] The length of the queue was supposed to be configurable, but was being overridden by supervisor. The queue is now actually configurable.
  • [PR 1478] A rare error in the EXPLAIN statement was caused by a function_clause error in riak_pb_ts_codec:encode_field_type/1 due to a typo in the code. The typo has been fixed.
  • [Issue 1472/PR 1474] The error message has been improved when selecting an empty time range.
  • [PR 1516] The equality operator was not working correctly with timestamp. The timestamp can now be queried using equality operators.
  • [PR 1545 & riak_test PR 1208] Attempting to insert data into a non-existant table would cause crash.
  • [PR 1130] It was possible to create a table without specifying a local key - the primary key would be copied over. This led to strange tables with no valid use. This now correctly returns an error.
  • [PR 1286] Aggregation functions like MAX, MIN etc would cast timestamps to sint64 by default. They now correctly return values of type timestamp which appear correctly as times in riak-shell.
  • [PR 157 & PR 1206] SQL insert statements of the form INSERT INTO mytable (field1, field2, field3) VALUES(val1, val2, val3) were buggy.


Riak TS is compatible with the following:

  • RHEL/CentOS 6
  • RHEL/CentOS 7
  • Ubuntu 14.04 (Trusty) LTS
  • Ubuntu 16.04 (Xenial) LTS*
  • Debian 7 “Wheezy”(development only)
  • Debian 8 “Jessie”
  • OS X 10.11+ (development only)
  • Amazon Linux 2016.09

Known Issues

  • AAE must remain turned off.
  • You cannot use Bitcask with Riak TS tables.
  • riak_kv.query.timeseries.max_quanta_span is capped at 1000 due to a bug.

You can see a table of KV and TS features here.