Skip to content

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

Closed

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].

Activity

  1. added a commit that references this issue on Oct 16, 2025
    c49b129
  2. madelson commented on Oct 22, 2025

    @madelson
    Owner
  3. added a commit that references this issue on Oct 26, 2025
    08c6404
  4. added this to the 2.7.1 milestone on Oct 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions