Skip to content

DistributedLock.Redis lua error with keyprefix on redis cluster.#254

@pengweiqhca

Description

@pengweiqhca

The following script will cause an error on some cloud Redis servers:

EVAL if redis.call('get', ARGV[1]) == ARGV[2] then return redis.call('del', ARGV[1]) end return 0 
StackExchange.Redis.RedisServerException: ERR bad lua script for redis cluster, all the keys that the script uses should be passed using the KEYS array, and KEYS should not be in expression. 

ChatGPT suggests using KEYS[0].

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions