Skip to content

Latest commit

 

History

History
671 lines (527 loc) · 43.4 KB

riak-1.4.md

File metadata and controls

671 lines (527 loc) · 43.4 KB

Riak 1.4.10 Release Notes

This is a bugfix release on the 1.4 series of Riak.

Issues / PR's Resolved

Riak 1.4.9 Release Notes

This is a bugfix release on the 1.4 series of Riak.

Memory backend fixes

The prior to this release deletes on the memory backend when max_memory was set would result in the space limit not being updated, so that the number of values storable would shrink over time, eventually leading to no values being storable at all.

Additionally, there was an interaction with expiry when both were set which would cause gets on expired values (which call the delete path above) to have the same effect.

Issues / PR's Resolved

Riak 1.4.8 Release Notes

This is a bugfix release on the 1.4 series of Riak.

Issues / PR's Resolved

AAE regression fixed

This fixes the backport issue that caused AAE to stop detecting object modifications due to a failure to compute the hashes.

IMPORTANT We recommend removing current AAE trees before upgrading. That is, all files under the anti_entropy sub-directory. This will avoid potentially large amounts of repair activity once correct hashes start being added. The data in the current trees can only be fixed by a full rebuild, so this repair activity is wasteful. Trees will start to build once AAE is re-enabled. To minimize the impact of this, we recommend upgrading during a period of low activity.

Bitcask startup failures on upgrade.

A regression introduced in 1.4.4 caused bitcask partitions to no longer be able to start when an empty datafile had the highest file id in that partition. This most commonly happened on the first start of an upgraded node going from a pre-1.4.4 build to something later, but was possible to see in a few other conditions. The fix added in this release removes empty files on partition startup, and fixes added in 1.4.4 will prevent them from being created in the future.

Issues Closed

Riak 1.4.7 Release Notes

This is a bugfix release on the 1.4.x series of Riak

Issues / PR's Resolved

Fix Bitcask NIF mode

Configuring Bitcask to use NIF mode (file I/O operations using native code instead of Erlang) would result in the backend being unable to create new files.

Fix 2i AAE being disabled on AAE tree rebuilds

The ability to repair 2i data would be lost once AAE did a tree re-build. By default trees are re-built after a week, so the command could work for a while and then suddenly break.

Active Anti-Entropy exchange & repair throttle

A throttle based upon cluster-wide values of the riak_kv_vnode_max statistic has been added in riak_kv/754. Its purpose is to avoid rare situations where vnodes are overloaded by AAE exchange and repair operations.

  • The exchange & repair throttle is enabled by default. Define {aae_throttle_kill, true} in the riak_kv section of the app.config file to disable the throttle entirely.
    • It may also be disabled/enabled non-persistently using the Riak console to execute riak_kv_entropy_manager:set_aae_throttle_kill(true | false)., respectively.
  • The configured throttle defaults, as defined by aae_throttle_sleep_time item in the riak_kv section of the app.config file, appear to be very effective in lab testing.
    • The Riak console can be used to execute query and change the setting non-persistently using riak_kv_entropy_manager:get_aae_throttle_limits() and riak_kv_entropy_manager:set_aae_throttle_limits(LimitDefinition).
    • Contact Basho support if the default weightings are not effective.
  • The configuration syntax for this throttle has been converted to Cuttlefish-style syntax for the Riak 2.0 release. The implementation of the throttle is the same as the 1.4.7 release.

Issues Closed

Riak 1.4.6 Release Notes

This is a bugfix release on the 1.4.x series of Riak.

Secondary index improvements

Broken 2i queries during a rolling upgrade

  • riak_kv/766 2i queries could fail if some nodes in the cluster were running on older versions of Riak (1.3.x, 1.4.2 for example).

AAE tree building fails to hash secondary index data

  • riak_kv/767 AAE trees building would fail to hash 2i data. The logs would be filled with error messages and the system may have wastefully issued many repair operations that would end up doing nothing.

Regular expression filter in range queries.

The new term_regex parameter filters secondary index range query results such that only terms that match the regular expression are returned. For example, the following query:

http://localhost:10018/buckets/b/index/f1_bin/a/z?return_terms=true

If it returned the following term/keys pairs:

[("baa", "key1"),("aab", "key2"),("bba", "key3")]

Passing the following regular expression:

http://localhost:10018/buckets/b/index/f1_bin/a/z?return_terms=true&term_regex=^.a

Would return only the items that have an 'a' as the second character in the term:

[("baa", "key1"),("aab", "key2")]

Note: This feature is not character encoding aware. We recommend normalizing your data to ascii characters if possible.

Faster internal encoding/decoding of leveldb secondary index data

We are now using a C version of the sext codec used to write and read secondary index and object key data. This should speed up secondary index query scans that read a large number of items from leveldb.

Pagination performance fix

When using small page sizes, it was possible for vnodes to send a batch of results larger than the page size. Those results could have never been sent to the client anyway. That has been fixed.

Sorting in non-paginated queries.

Paginated secondary index queries work by sorting results by term, then key. When they were introduced, this internal sorting also became the default for regular secondary index queries not involving pagination. That caused performance degradation in some cases. The default behavior of non-paginated queries (those not using the max_results or continuation parameters) has been changed back to unsorted. The pagination_sort parameter can be used to re-enable this sorting per request. Also, the behavior can be restored per node in the configuration file by setting secondary_index_sort_default to true in the riak_kv section of the app.config. This should be useful if your application relied on this order and a code change is inconvenient.

Anti-entropy for secondary index data.

The new riak-admin repair-2i command will scan and fix any mismatches between the secondary index data used for querying and the secondary index data stored in the riak objects. It can run on all the partitions of a node or in a subset of them. Use the riak-admin repair-2i status command to monitor the progress of a repair. A repair may be stopped with riak-admin repair-2i kill.

This operation involves scanning all the secondary index data used for querying from disk, then building a hashtree. This hashtree will be used to minimize the number of riak_objects that will be read from disk and repaired. We recommend scheduling repairs during non-peak activity time windows.

Stats

Added a timeout to stat calculation so that stuck or extremely slow processes no longer keep stats from proceeding forever. riak_core 467

Issues / PR's Resolved

Known issues

  • The new 2i AAE feature will stop working when the AAE trees expire and are rebuilt. We are already working on addressing this in the next point release.
  • Issuing 2i queries during a rolling upgrade with the memory backend will fail if 1.4 nodes are mixed with pre-1.4 nodes.

Riak 1.4.3, 1.4.4, 1.4.5

These were unreleased Riak versions

Riak 1.4.2 Release Notes

This is a bugfix release on the Riak 1.4.x series.

  • Fixed various problems related to crashing stats
  • Fixed extra noisy logs introduced in 1.4.1 (Not found errors and others)
  • Fixed issues related to 2i queries timing out
  • Added more protection against corrupt data in backends
  • Fixed incorrect capability negotiation causing nodes to appear incompatible in Riak Control

Issues / PR's Resolved

Riak 1.4.1 Release Notes

This is a bugfix release. The major fixes are to the Secondary Index, Riak Control, and LevelDB subsystems.

  • Pagination for equality queries is fixed by riak_kv/615.

  • The ability to set a timeout on a 2i query has been added by riak_kv/616.

  • Using 2i as input for a map-reduce job has been fixed by riak_kv/618.

  • Riak Control can crash its host node when in a mixed-cluster environment containing a 1.4.0 node. This has been addressed by riak_control/120.

  • Basho's leveldb fork has added better fadvise support and fixed some race conditions in the write path. See leveldb/88.

Issues / PR's Resolved

Riak 1.4.0 Release Notes

Major Features / Improvements

Improved Binary Format

Data stored in Riak can now be represented in a more compact format. The new format reduces storage overhead, especially in the case of small objects or those with large bucket names, keys, or metadata.

By default new Riak clusters, starting with Riak 1.4, will have the new format enabled by default. Users upgrading to Riak 1.4 should first perform the upgrade and once happy with the operation enable the new format. Riak supports both the old and new representation simultaneously, so no additional upgrade process is necessary.

Which representation is used can be configured by setting object_format to either v0 or v1 in the riak_kv section of app.config. v1 is the new format.

The new format is also used during handoff if the cluster supports it.

For users who upgrade to Riak 1.4 and enable the new format, downgrading to a previous version requires reformatting any data written in the new representation (previous version of Riak won't understand it). A utility is provided via riak-admin to perform this operation:

riak-admin downgrade-objects <kill-handoffs> [<concurrency>]

The utility should be run per-node immediately prior to downgrading it. <kill-handoffs> must be either true or false. If false any ongoing handoff will be waited on before performing the reformat. Otherwise, all in-flight handoff, inbound to the node or outbound from it, will be killed. During and after the reformat the transfer-limit will be set to 0. The optional <concurrency> argument must be an integer greater than zero. It determines how many partitions are reformatted on the node concurrently. By default the concurrency is two. Additionally, in anticipation that the entire cluster will be downgraded downgrade-objects sets the preferred format to v0. downgrade-objects can be run multiple times in the case of error or if the node crashes.

Changed behavior of riak attach

If you are a frequent user of riak attach it is worth noting that the behavior has changed in 1.4. riak attach used to attach to a named pipe that erlang provides to talk to running erlang nodes. This is great except that an accidental Ctrl-C would not only kill your session, but also kill the running node. The behavior has now changed to use -remsh (remote shell) to connect to the node. This method is safer because a Ctrl-C will not kill a running node. In cases where distributed erlang having problems for some reason and a -remsh is not wanted, riak attach-direct is a new command which uses the old pipe behavior of riak attach.

riak-admin transfers Improvements

The output of riak-admin transfers now includes per-transfer progress reporting and improved display of long node names.

Whether or not progress is reported and how the progress is calculated is dependent on the cluster's backend. Progress reporting is enabled for riak_kv_bitcask_backend, riak_kv_eleveldb_backend and riak_kv_memory_backend. Clusters using riak_kv_multi_backend will not have progress reporting enabled. When using riak_kv_bitcask_backend or riak_kv_memory_backend progress is determined by the number of keys already transferred out of the total number stored. Large variance in value sizes can skew reporting. For riak_kv_eleveldb_backend progress is measured in stored bytes. The total number of bytes used may be an overestimate -- meaning progress will always be what is reported or further along than reported in the worst case.

Lager Upgrade 1.2.2 to 2.0.0

Lager has been updated in Riak from Lager 1.2.2 that was in the Riak 1.3.x series to Lager 2.0.0. Please see the lager documentation at https://github.com/basho/lager for the new capabilities in Lager 2.0.

Querying

Pagination Support in 2i

We've extended Riak's Secondary Indexing (2i) interface to allow for paginated results. This is done via the max_results option in both the Protocol Buffers and HTTP 2i end points. Full details can be found here.

Client APIs

Client-specified timeouts

Clients can now specify a timeout value, in milliseconds, that will override the default internal timeout on requests that manipulate objects (fetch, store, delete), list buckets, or list keys.

Protocol Buffers bucket properties

The Protocol Buffers interface now supports all known bucket properties, and the ability to "reset" bucket properties to their defaults.

List-buckets streaming

Similar to listing keys, listing buckets can be streamed to clients. This means that Riak will send bucket names to the client as they are received, rather than waiting for the request to complete on all nodes.

Protocol buffers binds to multiple interfaces

Similar to HTTP, Protocol Buffers will now bind to multiple interfaces and ports. Existing configurations will change the previous pb_port and pb_ip settings to the singular pb setting, which is a list of IP/port pairs.

Data Types

PN-Counters

1.4 sees the addition of Riak's first data type: PN-Counters. A PN-Counter is capable of being both incremented (P) and decremented (N). The full details are here. We're also fast at work on a CRDT Cookbook that will demonstrate this and future data types in Riak.

Riak Control

Riak Control now has an improved cluster management interface, and standalone node management interface, for staging and committing changes to the cluster, which mimics the CLI API.

New command: riak-debug

The command riak-debug is a shell script provided to aid in the automation of gathering information from Riak nodes for troubleshooting. Information gathered includes operating system command output, Riak command output, Riak configuration files, and Riak logs. See riak-debug -h and man riak-debug for more information on using the script and for tips on integrating its usage into your workflow.

Packaging / Runtime changes

Riak 1.4 took a major step forward in how it is packaged by changing over to using node_package for its packaging. This is the same tool used for RiakCS since its first release. This commonality will improve overall feature parity and stability of the packages themselves by cutting down on the number of places packaging bug fixes need to happen. See the 'node_package' section in the Issues section for all the bug fixes to packaging in this release.

Platforms Added / Removed

Support for Debian Wheezy and SmartOS 13.1 have been added to 1.4. As planned, support for 32bit packages has been dropped.

Major changes in packages and runtime
  • init.d scripts for Deb and RPM systems have been rewritten to comply with the standards of those distributions. In particular the init scripts now actually return nonzero exit codes on failure. This was a major issue we had that prevented tools from working seamlessly.
  • All start, stop, and status commands use return codes rather than reading stdout. This has been a major 'technical debt' we've had for a long time and it is about time the rest of it is finally fixed.
  • riak.pid files are now created and removed on riak start/stop. This allows other tools to take advantage of .pid files without them needing knowledge about the riak script or nodetool.
  • Warnings added to riak attach and riak attach-direct to let users know about implications of q() and CTRL-C
  • The riak script now makes it more obvious which commands need to be run as the Riak user (or root user). Status commands like getpid or ping can be run by any user while daemon commands like start and stop will error in a more graceful if not run by the Riak user.

Issues / PR's Resolved

Known Issues

leveldb 1.3 to 1.4 conversion

The first execution of 1.4.0 leveldb using a 1.3.x or 1.2.x dataset will initiate an automatic conversion that could pause the startup of each node by 3 to 7 minutes. The leveldb data in "level #1" is being adjusted such that "level #1" can operate as an overlapped data level instead of as a sorted data level. The conversion is simply the reduction of the number of files in "level #1" to being less than eight via normal compaction of data from "level #1" into "level #2". This is a one time conversion.

Deprecation Warnings

Ubuntu 11.04 (Natty) EOL

Ubuntu 11.04 Natty Narwhal reached its end-of-life October 2012 and recently the public apt updates and security repos were removed. Due to this, Riak will no longer be built against 11.04 going forward. We will consider supporting the latest non-LTS release depending on the timing of the next major Riak release.

Ubuntu LTS releases still supported (10.04 and 12.04) are unaffected.