Redis 5.0 release notes
=======================

--------------------------------------------------------------------------------
Upgrade urgency levels:

LOW:      No need to upgrade unless there are new features you want to use.
MODERATE: Program an upgrade of the server, but it's not urgent.
HIGH:     There is a critical bug that may affect a subset of users. Upgrade!
CRITICAL: There is a critical bug affecting MOST USERS. Upgrade ASAP.
SECURITY: There are security fixes in the release.
--------------------------------------------------------------------------------

================================================================================
Redis 5.0 RC3     Released Wed Jun 14 9:51:44 CEST 2018
================================================================================

Upgrade urgency LOW:

This release fixes compilation of Redis RC2. For an error the commit from unstable
updating the Rax library was not merged into the 5.0 branch.

================================================================================
Redis 5.0 RC2     Released Wed Jun 13 12:49:13 CEST 2018
================================================================================

Upgrade urgency CRITICAL: This release fixes important security issues.
                    HIGH: This release fixes a SCAN commands family bug.
                MODERATE: This release fixes a PSYNC2 edge case with expires.
                MODERATE: Sentinel related fixes.
                     LOW: All the other issues

NOTE: This release breaks API compatibility with certain APIs that were
introduced in Redis 5.0 RC1. Notably ZPOP* now returns score/element in reverse
order. XINFO <key> special form was removed, now XINFO STREAM <key> must be
used to obtain general information about the stream.

Redis 5.0 RC2 ixes a number of important issues:

* Important security issues related to the Lua scripting engine.
  Please check https://github.com/antirez/redis/issues/5017
  for more information.

* A bug with SCAN, SSCAN, HSCAN and ZSCAN, that may not return all the elements.
  We also add a regression test that can trigger the issue often when present, and
  may in theory be able to find unrelated regressions.

* A PSYNC2 bug is fixed: Redis should not expire keys when saving RDB files
  because otherwise it is no longer possible to use such RDB file as a base
  for partial resynchronization. It no longer represents the right state.

* Compatibility of AOF with RDB preamble when the RDB checksum is disabled.

* Sentinel bug that in some cases prevented Sentinel to detect that the master
  was down immediately. A delay was added to the detection.

* XREADGROUP would crash when the master had attacked slaves.

* Replication and events generation of several streams command were fixed.

* XREVRANGE fixed, in some cases it could not return elements, or crash the
  server, or in general not behave correctly.

* ZPOP can now unblock multiple clients in a sane way.

* Other minor issues.

Moreover this release adds new features:

* XGROUP DESTROY and XGROUP SETID.

* RDB loading speedup.

* Configurable stream macro node limits (number of elements / bytes).

* More smaller improvements.

The following is the list of commits composing the release, please check
the commit messages and authors for credits.

antirez in commit 9fdcc159:
 Security: fix redis-cli buffer overflow.
 1 file changed, 16 insertions(+), 11 deletions(-)

antirez in commit cf760071:
 Security: fix Lua struct package offset handling.
 1 file changed, 6 insertions(+), 2 deletions(-)

antirez in commit a57595ca:
 Security: more cmsgpack fixes by @soloestoy.
 1 file changed, 7 insertions(+)

antirez in commit 8783fb94:
 Security: update Lua struct package for security.
 1 file changed, 23 insertions(+), 23 deletions(-)

antirez in commit 8cb9344b:
 Security: fix Lua cmsgpack library stack overflow.
 1 file changed, 3 insertions(+)

赵磊 in commit 59080f60:
 Fix dictScan(): It can't scan all buckets when dict is shrinking.
 1 file changed, 14 insertions(+), 11 deletions(-)

dejun.xdj in commit ac2a824a:
 Fix redis-cli memory leak when sending set preference command.
 1 file changed, 2 insertions(+)

dejun.xdj in commit c7197ff5:
 Check if the repeat value is positive in while loop of cliSendCommand().
 1 file changed, 1 insertion(+), 1 deletion(-)

dejun.xdj in commit 3f77777f:
 Change the type of repeat argument to long for function cliSendCommand.
 1 file changed, 1 insertion(+), 1 deletion(-)

dejun.xdj in commit 7a565d72:
 Fix negtive repeat command value issue.
 1 file changed, 11 insertions(+), 3 deletions(-)

dejun.xdj in commit 64bf60fb:
 Detect and stop saving history for auth command with repeat option.
 1 file changed, 17 insertions(+), 10 deletions(-)

dejun.xdj in commit 5bed12aa:
 Change the warning message a little bit to avoid trademark issuses.
 1 file changed, 1 insertion(+), 1 deletion(-)

dejun.xdj in commit d71c4961:
 Stop saving auth command in redis-cli history.
 1 file changed, 4 insertions(+), 2 deletions(-)

dejun.xdj in commit fca99e41:
 Add warning message when using password on command line
 1 file changed, 1 insertion(+)

antirez in commit 01407a3a:
 Don't expire keys while loading RDB from AOF preamble.
 3 files changed, 5 insertions(+), 5 deletions(-)

WuYunlong in commit fb5408cf:
 Fix rdb save by allowing dumping of expire keys, so that when we add a new slave, and do a failover, eighter by manual or not, other local slaves will delete the expired keys properly.
 2 files changed, 3 insertions(+), 7 deletions(-)

antirez in commit 0b8b6df4:
 Backport hiredis issue 525 fix to compile on FreeBSD.
 1 file changed, 1 insertion(+), 1 deletion(-)

antirez in commit e98627c5:
 Add INIT INFO to the provided init script.
 1 file changed, 8 insertions(+)

antirez in commit 17f5de89:
 Fix ae.c when a timer finalizerProc adds an event.
 2 files changed, 10 insertions(+), 6 deletions(-)

antirez in commit 266e6423:
 Sentinel: fix delay in detecting ODOWN.
 1 file changed, 9 insertions(+), 5 deletions(-)

zhaozhao.zz in commit eafaf172:
 AOF & RDB: be compatible with rdbchecksum no
 1 file changed, 9 insertions(+), 7 deletions(-)

huijing.whj in commit 4630da37:
 fix int overflow problem in freeMemoryIfNeeded
 1 file changed, 1 insertion(+), 1 deletion(-)

================================================================================
Redis 5.0 RC1   Released Tue May 29 14:14:11 CEST 2018
================================================================================

Upgrade urgency LOW: This is the first RC of Redis 5.

Introduction to the Redis 5 release
===================================

Redis 5 is a release focused on a few important features. While Redis 4
was very very focused on operations, Redis 5 changes are mostly user-facing,
with the implementation of new data types and operations on top of existing
types. The following are the major features of this release:

1. The new Stream data type. https://redis.io/topics/streams-intro
2. New Redis modules APIs: Timers and Cluster API.
3. RDB now store LFU and LRU information.
4. The cluster manager was ported from Ruby (redis-trib.rb) to C code
   inside redis-cli. Check `redis-cli --cluster help` for more info.
5. New sorted set commands: ZPOPMIN/MAX and blocking variants.
6. Active defragmentation version 2.
7. Improvemenets in HyperLogLog implementations.
8. Better memory reporting capabilities.
9. Many commands with sub-commands now have an HELP subcommand.
10. Better performances when clients connect and disconnect often.
11. Many bug fixes and other random improvements.
12. Jemalloc was upgraded to version 5.1

Thanks to all the users and developers who made this release possible.
We'll follow up with more RC releases, until the code looks production ready
and we don't get reports of serious issues for a while.

A special thank you for the amount of work put into this release
(in decreasing number of commits) by:

Fabio Nicotra, <artix2@gmail.com>
Soloestoy <zhaozhao.zz@alibaba-inc.com>
Itamar Haber <itamar@redislabs.com>
Oran Agra <oran@redislabs.com>
Dvir Volk <dvirsky@gmail.com>
dejun.xdj <dejun.xdj@alibaba-inc.com>
Guy Benoish <guy.benoish@redislabs.com>
Charsyam <charsyam@gmail.com>
Otmar Ertl <otmar.ertl@gmail.com>
Jan-Erik Rediger <janerik@fnordig.de>
Spinlock <wnzheng@gmail.com>

Migrating from 4.0 to 5.0
=========================

Redis 4.0 is mostly a strict subset of 5.0, you should not have any problem
upgrading your application from 4.0 to 5.0. However this is a list of small
non-backward compatible changes introduced in the 5.0 release:

* redis-cli now implements the cluster management tool. We still ship the
  old redis-trib, but new fixes will be implemented only in redis-cli.
  See `redis-cli --cluster help` for more info.

* The RDB format changed. Redis 5.0 is still able to read 4.0 (and all the
  past versions) files, but not the other way around.

* Certain log formats and sentences are different in Redis 5.0.

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

Credits: For each release, a list of changes with the relative author is
provided. Where not specified the implementation and design is done by
Salvatore Sanfilippo. Thanks to Redis Labs for making all this possible.
Also many thanks to all the other contributors and the amazing community
we have.

Commit messages may contain additional credits.

Enjoy,
Salvatore
