-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for #1564: Return empty array instead of single element nil array…
… in value array processor (#1993) This changes the return of a nil result through the `RedisValueArrayProcessor` so that it's a `[]` instead of a single element `[ nil ]` in our handling. This affects the following commands, which are multibulk when a count is provided (even if it's 1), otherwise they are bulkstring. This change affects the non-count case when it's null. Instead of a single element array with a nil value, we'd return an empty array as the Redis surface area intends: - `LPOP`/`RPOP` - `SRANDMEMBER` - `SPOP` The other usages of `RedisValueArrayProcessor` are _always_ multibulk and are not affected: - `HMGET` - `HKEYS` - `HVALS` - `LRANGE` - `MGET` - `SDIFF` - `SINTER` - `SUNION` - `SMEMBERS` - `SORT` - `XCLAIM` - `Z(REV)RANGE` - `Z(REV)RANGEBYLEX` - `Z(REV)RANGEBYSCORE`
- Loading branch information
1 parent
34ba699
commit 4fb787c
Showing
3 changed files
with
23 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters