Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set method errors on NX condition mismatch #20

Open
Luzifer opened this issue Jan 27, 2020 · 0 comments
Open

Set method errors on NX condition mismatch #20

Luzifer opened this issue Jan 27, 2020 · 0 comments

Comments

@Luzifer
Copy link

Luzifer commented Jan 27, 2020

From the Redis documentation:

Simple string reply: OK if SET was executed correctly. 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.
https://redis.io/commands/set

Within the code the Set method performs an OKValue check which expects to see a StatusReply only. Therefore setting NX to true causes the error invalid reply type, not status even though the command was executed successfully and should not cause an error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant