You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Vyacheslav Koptilin (Jira)" <ji...@apache.org> on 2020/05/07 11:57:00 UTC

[jira] [Commented] (IGNITE-12986) Redis mget command is broken

    [ https://issues.apache.org/jira/browse/IGNITE-12986?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17101591#comment-17101591 ] 

Vyacheslav Koptilin commented on IGNITE-12986:
----------------------------------------------

Well, the documentation does not explicitly guarantee that the command should preserve the order of keys and I think the right answer is yes, this command has to provide such a guarantee [1]. Otherwise, the user wouldn't know how to match keys and values.

[1] [https://redis.io/commands/mget]

I will take a look at this issue.

> Redis mget command is broken
> ----------------------------
>
>                 Key: IGNITE-12986
>                 URL: https://issues.apache.org/jira/browse/IGNITE-12986
>             Project: Ignite
>          Issue Type: Bug
>    Affects Versions: 2.8
>            Reporter: Vishnu Bharathi
>            Priority: Major
>             Fix For: 2.9
>
>
> When trying to use the redis layer for ignite, noticed that the data returned by the mget command is inconsistent. Hence the mget command is broken. To demostrate here is an example
> {code}
> 127.0.0.1:11211> set a 1
> OK
> 127.0.0.1:11211> set b 2
> OK
> 127.0.0.1:11211> set c 3
> OK
> (0.98s)
> 127.0.0.1:11211> mget a b c 
> 1) "1"
> 2) "2"
> 3) "3"
> 127.0.0.1:11211> mget c b a
> 1) "1"
> 2) "2"
> 3) "3"
> 127.0.0.1:11211> mget a c b
> 1) "1"
> 2) "2"
> 3) "3"
> {code}
> If you notice, the order of the values returned does not match the order of the values returned.
> In order to demonstrate the expected behaviour, will run the same commands against a real redis instance and paste the output below.
> {code}
> 127.0.0.1:6379> set a 1 
> OK
> 127.0.0.1:6379> set b 2 
> OK
> 127.0.0.1:6379> set c 3
> OK
> 127.0.0.1:6379> mget a b c 
> 1) "1"
> 2) "2"
> 3) "3"
> 127.0.0.1:6379> mget c b a
> 1) "3"
> 2) "2"
> 3) "1"
> 127.0.0.1:6379> mget a c b
> 1) "1"
> 2) "3"
> 3) "2"
> {code}
> This is not only happening on the redis-cli, it is also happening when using redis client libraries. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)