Hello,

I downloaded the redis pre-release 6.2 version here, I started the server but the version displayed was 6.1.

The server

I also checked with the INFO command, I got the same result.

The hash commit 2dba1e3 that references 6.2-rc-3 is the same, so I don't understand why 6.1 gets displayed instead of 6.2.

So I tried to run a command that only got supported in 6.2: SET key "hello" NX GET A syntax error is returned; it should have returned a null bulk response as the documentation says.

Thanks

Comment From: madolson

So, 6.1.X is in fact the release candidates. It's just how we name things. https://github.com/redis/redis/blob/6.2/src/version.h

I think SET key 'HELLO' NX GET should work though. Set a key to be hello, and get it, but only when it's not there. The documentation implies it should be allowed, I'll take a look into that, maybe it's a regression.

Comment From: madolson

Oh, my bad, I was confusing NX and XX. The command you used isn't valid because you are saying, "return the previous key, but only when there was no previous key". Try again with something like: SET key "hello" XX GET and it should work.

Comment From: ynden

I understand now, thank you.

Question: the doc says that :

Null reply: a Null Bulk Reply is returned if the SET operation was not performed because the user specified the NX or XX option but the condition was not met or if user specified the NX and GET options that do not met.

So it should have returned a null response?

Comment From: madolson

Honestly, I was reading that, and I think the sentence is wrong. I think a syntax error is the correct response, because the command doesn't really make sense.

Null reply: a Null Bulk Reply is returned if the SET operation was not performed because the user specified the NX or XX option but the condition was not met or if the user specified the GET option and there was no previous value for the key.

Comment From: ynden

Sounds good, thank you for your time!

Comment From: itamarhaber

Documentation fixed via https://github.com/redis/redis-doc/commit/4514130e0abb64c50f5f16d5d9527f1fd3f7b051.

Closing and thanks.