Redis Cloud changelog (June 2023)
This changelog lists new features, enhancements, and other changes added to Redis Cloud during June 2023.
New features
Redis 7.2 fixed opt-in
You can opt in to Redis 7.2 on Fixed subscriptions in selected regions in AWS and GCP. Redis 7.2 introduces several changes to existing Redis commands; see the list of breaking changes for more details.
Export database list to CSV includes Active-Active
Your Active-Active databases will now appear in the database list when you export it to a CSV file. To support this, we added a “Region” column to differentiate between Active-Active databases with the same name.
To export your database list to a CSV file, select Export all on the Databases screen.
Breaking changes
Redis 7.2 breaking changes
When new major versions of open source Redis change existing commands, upgrading your database to a new version can potentially break some functionality. Before you upgrade, make sure to read the provided list of breaking changes that affect Redis Enterprise and update any applications that connect to your database to handle these changes.
Confirm your Redis database version (redis_version) using the admin console or run the following INFO command via redis-cli:
$ redis-cli -p <port> INFO
"# Server
redis_version:7.0.8
..."
Breaking changes from version 7.0
Upgrading to Redis version 7.2 from version 7.0 introduces the following potentially breaking changes to Redis Enterprise:
Programmability
Time sampling is now frozen during command execution and scripts (#10300). While a command or script is running, the keys used by the command or script will not expire. This breaks any script that uses a loop to wait for a key to expire.
Blocked commands in scripts now work the same way as when they are used in transactions (#11568).
Error handling
A blocked stream command that is released when a key no longer exists returns a different error code (#11012).
- For newly unblocked streams, lists, and zsets, the old implementation returned
UNBLOCKEDwhen the stream key was deleted or overwritten with a different type. Now, errors will be the same as if the command was processed after the effect.
- For newly unblocked streams, lists, and zsets, the old implementation returned
ACL errors have been unified across Redis. (#11160)
- When using RedisModule_Call module API function, ACL errors return
-NOPERMinstead of-ERR
- When using RedisModule_Call module API function, ACL errors return
XREADGROUPandXAUTOCLAIMcreate a consumer regardless of whether it was able to perform reading or claiming (#11012).Any float that is Not a Number will return
nan(#11597).
ACLs
- When a blocked client is being unblocked, checks for ACLs and OOM condition checks are now re-evaluated (#11012).
- If the ACL rules have changed since the command was executed, the command might fail after the client is unblocked.
Command introspection, stats, and configuration
When running
XINFO CONSUMERS, theidletime now shows the number of milliseconds that have passed since the last attempted interaction, and theinactivetime shows the number of milliseconds since the last successful interaction (#11099)- Previously,
idletime showed the number of milliseconds that passed since the last successful interaction and there was noinactivetime.
- Previously,
Command stats are only updated when the command executes (#11012).
- Previously, the command stats were updated even if a command was blocked. The command stats are now updated only if and when the command is executed.
Breaking changes from version 6.2
Upgrading to open source Redis version 7.2 from version 6.2 introduces the following potentially breaking changes to Redis Enterprise.
All breaking changes from version 7.0 also apply to Redis version 6.2.
Programmability
Lua scripts no longer have access to the
print()function (#10651) - Theprintfunction was removed from Lua because it can potentially cause the Redis processes to get stuck (if no one reads from stdout). Users should use redis.log. An alternative is to override theprintimplementation and print the message to the log file.Block
PFCOUNTandPUBLISHin read-only scripts (*_RO commands,no-writes) (#10744) - ConsiderPFCOUNTandPUBLISHas write commands in scripts, in addition toEVAL; meaning:- They can never be used in scripts with shebang (
#!) and nono-writesflag - They are blocked in
EVAL_ROand_ROvariants, (even in scripts without shebang (#!) flags) - Allow
no-writescripts in EVAL (not just in EVAL_RO), even duringCLIENT PAUSE WRITE
- They can never be used in scripts with shebang (
Hide the
may_replicateflag from theCOMMANDcommand response (#10744) - As part of the change to treatmay_replicatecommandsPFCOUNTandPUBLISHas write commands in scripts, in addition toEVAL, themay_replicateflag has been removed from theCOMMANDresponse.
Error handling
Rephrased some error responses about invalid commands or arguments (#10612) -
- Error response for unknown command introduced a case change (
Unknowntounknown) - Errors for module commands extended to cover subcommands, updated syntax to match Redis Server syntax
- Arity errors for module commands introduce a case change (
Wrongtowrong); will consider full command name
- Error response for unknown command introduced a case change (
Corrected error codes returned from
EVALscripts (#10218, #10329).These examples show changes in behavior:
1: config set maxmemory 1 2: +OK 3: eval "return redis.call('set','x','y')" 0 - 4: -ERR Error running script (call to 71e6319f97b0fe8bdfa1c5df3ce4489946dda479): @user_script:1: @user_script: 1: -OOM command not allowed when used memory > 'maxmemory'. + 4: -ERR Error running script (call to 71e6319f97b0fe8bdfa1c5df3ce4489946dda479): @user_script:1: OOM command not allowed when used memory > 'maxmemory'. 5: eval "return redis.pcall('set','x','y')" 0 - 6: -@user_script: 1: -OOM command not allowed when used memory > 'maxmemory'. + 6: -OOM command not allowed when used memory > 'maxmemory'. 7: eval "return redis.call('select',99)" 0 8: -ERR Error running script (call to 4ad5abfc50bbccb484223905f9a16f09cd043ba8): @user_script:1: ERR DB index is out of range 9: eval "return redis.pcall('select',99)" 0 10: -ERR DB index is out of range 11: eval_ro "return redis.call('set','x','y')" 0 -12: -ERR Error running script (call to 71e6319f97b0fe8bdfa1c5df3ce4489946dda479): @user_script:1: @user_script: 1: Write commands are not allowed from read-only scripts. +12: -ERR Error running script (call to 71e6319f97b0fe8bdfa1c5df3ce4489946dda479): @user_script:1: ERR Write commands are not allowed from read-only scripts. 13: eval_ro "return redis.pcall('set','x','y')" 0 -14: -@user_script: 1: Write commands are not allowed from read-only scripts. +14: -ERR Write commands are not allowed from read-only scripts.ZPOPMIN/ZPOPMAXused to produce wrong replies when count is 0 with non-zset #9711):ZPOPMIN/ZPOPMAXused to produce an(empty array)whenkeywas not a sorted set and the optionalcountargument was set to0and now produces aWRONGTYPEerror response instead.- The optional
countargument must be positive. A negative value produces avalue is out of rangeerror.
These examples show changes in behavior:
1: zadd myzset 1 "one" 2: (integer) 1 3: zadd myzset 2 "two" 4: (integer) 1 5: zadd myzset 3 "three" 6: (integer) 1 7: zpopmin myzset -1 - 8: (empty array) + 8: (error) ERR value is out of range, must be positive 9: 127.0.0.1:6379> set foo bar 10: OK 11: zpopmin foo 0 -12: (empty array) +12: (error) WRONGTYPE Operation against a key holding the wrong kind of valueLPOP/RPOPwith count against a nonexistent list returns a null array instead of(nil)(#10095). This change was backported to 6.2.LPOP/RPOPused to produce(nil)when count is 0, now produces a null array (#9692). This change was backported to 6.2.XCLAIM/XAUTOCLAIMskips deleted entries instead of replying withniland deletes them from the pending entry list (#10227) -XCLAIM/XAUTOCLAIMnow behaves in the following way:- If you try to claim a deleted entry, it is deleted from the pending entry list (PEL) where it is found (as well as the group PEL). Therefore, such an entry is not claimed, just cleared from PEL (because it doesn’t exist in the stream anyway).
- Because deleted entries are not claimed,
X[AUTO]CLAIMdoes not return “nil” instead of an entry. - Added an array of all the deleted stream IDs to
XAUTOCLAIMresponse.
ACLs
ACL GETUSERreply now uses ACL syntax forkeysandchannels(#9974).ACL GETUSERnow uses the ACL DSL (Domain Specific Language) for keys and channels.These examples show changes in behavior:
1: acl setuser foo off resetchannels &channel1 -@all +get 2: OK 3: acl getuser foo 4: 1) "flags" 5: 2) 1) "off" 6: 3) "passwords" 7: 4) (empty array) 8: 5) "commands" 9: 6) "-@all +get" 10: 7) "keys" -11: 8) (empty array) +11: 8) "" 12: 9)"channels" -13 10) 1) "channel1" +13 10) "&channel1"SORT/SORT_ROcommands reject key access patterns inGETandBYif the ACL doesn’t grant the command full keyspace access (#10340) - Thesortandsort_rocommands can access external keys viaGETandBY. In order to make sure the user cannot violate the authorization ACL rules, Redis 7 will reject external keys access patterns unless ACL allowsSORTfull access to all keys. For backwards compatibility,SORTwithGET/BYkeeps working, but if ACL has restrictions to certain keys, the use of these features will result in a permission denied error.These examples show changes in behavior:
USER FOO (+sort ~* ~mylist) #FOO> sort mylist by w* get v* - is O.K since ~* provides full key accessUSER FOO (+sort %R~* ~mylist) #FOO> sort mylist by w* get v* - is O.K since %R~* provides full key READ access**USER FOO (+sort %W~* ~mylist) #FOO> sort mylist by w* get v* - will now fail since $W~* only provides full key WRITE accessUSER FOO (+sort ~v* ~mylist) #FOO> sort mylist by w* get v* - will now fail since ~v* only provides partial key accessFix ACL category for
SELECT,WAIT,ROLE,LASTSAVE,READONLY,READWRITE,ASKING(#9208):SELECTandWAIThave been recategorized from@keyspaceto@connectionROLE,LASTSAVEhave been categorized as@adminand@dangerousASKING,READONLY,READWRITEhave also been assigned the@connectioncategory and removed from@keyspace- Command categories are explained in ACL documentation
Command introspection, stats, and configuration
COMMANDreply dropsrandomandsort-for-scriptsflags, which are now part of command tips (#10104) - Therandomflag was replaced with thenondeterministic_outputtip; thesort-for-scriptsflag was replaced by thenondeterministic_output_ordertipINFOcommandstatsnow shows the stats per sub-command (#9504) For example, while previous versions would provide a single entry for all command usage, in Redis 7, each sub command is reported separately:Redis 6.2:
cmdstat_acl:calls=4,usec=279,usec_per_call=69.75,rejected_calls=0,failed_calls=2Redis 7:
cmdstat_acl|list:calls=1,usec=4994,usec_per_call=4994.00,rejected_calls=0,failed_calls=0 cmdstat_acl|setuser:calls=2,usec=16409,usec_per_call=8204.50,rejected_calls=0,failed_calls=0 cmdstat_acl|deluser:calls=1,usec=774,usec_per_call=774.00,rejected_calls=0,failed_calls=0 cmdstat_acl|getuser:calls=1,usec=6044,usec_per_call=6044.00,rejected_calls=0,failed_calls=0
CONFIG REWRITE,CONFIG RESETSTAT, and mostCONFIG SETcommands are now allowed during loading (#9878)
Known limitations
There are two known limitations for the version of Redis 7.2 that is packaged with Redis Enterprise.
Using
XREADGROUP BLOCKwith>to return all new streams will cause the Redis database to freeze until the shard is restarted (#12031)Because a rejected command does not record the duration for command stats, an error will appear after it is reprocessed that will cause the Redis database to freeze until the shard is restarted (#12247)
Migration guides for certain clients
If you are using Go-Redis v9 or Lettuce v6+, which by default switch to the RESP3 protocol, and you are running Redis Stack commands, please make sure the protocol version is pinned to RESP2 prior to upgrading to Redis version 7.2.
Go-Redis
For applications using Go-Redis v9 and later, ensure that you have Go-Redis v9.0.5 or newer and pin the protocol version as shown below:
client := redis.NewClient(&redis.Options{
Addr: "<database_endpoint>",
Protocol: 2, // Pin the protocol version
})
No actions are required for applications using Go-Redis v8 or earlier.
Lettuce
To pin the protocol version, use the snippet below:
import io.lettuce.core.*;
import io.lettuce.core.api.*;
import io.lettuce.core.protocol.ProtocolVersion;
// ...
RedisClient client = RedisClient.create("<database_endpoint>");
client.setOptions(ClientOptions.builder()
.protocolVersion(ProtocolVersion.RESP2) // Pin the protocol version
.build());
// ...
If you are using LettuceMod, you need to upgrade to v3.6.0.
Deprecations
CLUSTER SLOTSis deprecated as of Redis 7.0QUITis deprecated as of Redis 7.2