Skip to content

MSETNX must not set keys if any of them exists #980

Description

@prvyk

Describe the bug

When msetnx gets several keys and one of them already exists, msetnx still sets the nonexisting keys. The redis page is very clear:

"MSETNX will not perform any operation at all even if just a single key already exists."

https://redis.io/docs/latest/commands/msetnx/

Steps to reproduce the bug

msetnx a 0 b 1
msetnx c 2 a 3

get a => 0
get c => 2

Expected behavior

No response

Screenshots

No response

Release version

No response

IDE

No response

OS version

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions