Skip to content

v0.9.3

Choose a tag to compare

@zcalusic zcalusic released this 28 Oct 15:43
· 48 commits to master since this release
v0.9.3

This release is about commands that silently did the wrong thing, or broke the connection, across nodes and replicas: they now work or get a clear error.

Upgrade notes

  • Multi-key commands spanning nodes are refused. RPOPLPUSH, SMOVE, SDIFF, SINTER, SUNION and their STORE forms, ZINTERSTORE, ZUNIONSTORE, PFCOUNT, JSON.MGET, EVALSHA, and SORT and GEORADIUS with STORE go whole to the node of their first key. When their keys belong to different nodes in any rack, they now get -ERR Dynomite: Keys in the request cannot span multiple nodes, use a hash tag. Before, they read keys the node doesn't have and wrote destinations no later read would find. Keys sharing a hash tag work as before, and so does any setup with one node per rack. EVAL was already checked, but only in the local rack; now every rack is checked.
  • SPOP is refused when there's more than one rack, because each replica popped different random members and the replicas' sets diverged. Use SRANDMEMBER and then SREM instead. With a single rack, SPOP works as before.
  • SRANDMEMBER, SDIFF, SINTER and SUNION read from the local rack only, at every consistency level. Their replies differ between replicas (random members, or members listed in each replica's own order), so quorum reads of them always failed.
  • Unsupported commands get an error and the connection stays open. XADD, FLUSHALL, BLPOP, CLIENT LIST and other commands Dynomite doesn't support now get Redis's unknown command or unknown subcommand error. Before, the connection was closed without a reply.
  • Big-endian machines hash keys like x86. murmur now gives the same tokens on every architecture. Tokens on x86 and arm64 don't change. A cluster running only on big-endian nodes (s390x, for example) would see its keys move.
  • Log changes: the "no quorum" error is reworded, and it and the DC_ONE "Swallowing cross rack error" line (now a warning) are logged at most once every 10 s, with a count of the lines left out. Unsupported commands from clients log a rate-limited warning. Update anything that matches on these lines; the stats counters still count every request.

Fixes

  • SELECT 0, which some clients send on connect, is answered with +OK instead of closing the connection. Other database indexes get the error Redis gives with one database.
  • LPOP, RPOP and SRANDMEMBER accept a count.
  • PFCOUNT accepts several keys.
  • UNLINK works; before, it closed the connection. It's sent as DEL, which gives the same reply.
  • DBSIZE is supported. It counts the keys of the node's own datastore, like KEYS and SCAN.
  • murmur and jenkins no longer read the key as native, possibly unaligned words. jenkins no longer reads up to 3 bytes past the key, and it's faster for aligned keys.

Documentation

  • notes/redis.md gains a section on commands with more than one key and on hash tags, and documents SELECT, DBSIZE, UNLINK, SPOP and SRANDMEMBER, and how unsupported commands are answered.

Testing

  • make check pins every hash function's tokens and checks they don't depend on the key's alignment. It now passes on x86, arm64 and s390x.
  • New unit test for the log rate limiting, and parser tests for the new and changed commands.
  • New functional tests for SELECT, the pop counts, SPOP and SRANDMEMBER across racks, multi-key routing with and without hash tags, DBSIZE and unsupported commands. The test clusters now set hash_tag: "{}".

Full Changelog: v0.9.2...v0.9.3