Skip to content

EVAL command can't work #85

Open
Open
@chenjie199234

Description

@chenjie199234

proxy start without cross slot support

./redis-cluster-proxy 127.0.0.1:10001
[2020-10-31 22:43:17.247/M] Redis Cluster Proxy v0.9.102
[2020-10-31 22:43:17.247/M] Commit: (00000000/0)
[2020-10-31 22:43:17.247/M] PID: 15979
[2020-10-31 22:43:17.247/M] OS: Darwin 19.6.0 x86_64
[2020-10-31 22:43:17.247/M] Bits: 64
[2020-10-31 22:43:17.247/M] Log level: info
[2020-10-31 22:43:17.247/M] Connections pool size: 10 (respawn 2 every 50ms if below 10)
[2020-10-31 22:43:17.248/M] Listening on *:7777
[2020-10-31 22:43:17.248/M] Starting 8 threads...
[2020-10-31 22:43:17.248/M] Fetching cluster configuration...
[2020-10-31 22:43:17.249/M] Cluster Address: 127.0.0.1:10001
[2020-10-31 22:43:17.249/M] Cluster has 3 masters and 0 replica(s)
[2020-10-31 22:43:17.249/M] Increased maximum number of open files to 10278 (it was originally set to 2560).
[2020-10-31 22:43:17.264/M] All thread(s) started!

redis command exec result (there is only one key "test")

redis-cli -p 7777
127.0.0.1:7777> eval "return {KEYS[1],ARGV[1]}" 1 "test" 123
(error) ERR Cross-slot queries are disabled. They can be enabled by using the --enable-cross-slot option, or by calling `PROXY CONFIG SET enable-cross-slot 1`. WARN: cross-slot queries can break the atomicity of the query itself.

proxy start with cross slot support

./redis-cluster-proxy --enable-cross-slot 127.0.0.1:10001
[2020-10-31 22:46:57.756/M] Redis Cluster Proxy v0.9.102
[2020-10-31 22:46:57.756/M] Commit: (00000000/0)
[2020-10-31 22:46:57.756/M] PID: 16002
[2020-10-31 22:46:57.756/M] OS: Darwin 19.6.0 x86_64
[2020-10-31 22:46:57.756/M] Bits: 64
[2020-10-31 22:46:57.756/M] Log level: info
[2020-10-31 22:46:57.756/M] Connections pool size: 10 (respawn 2 every 50ms if below 10)
[2020-10-31 22:46:57.757/M] Listening on *:7777
[2020-10-31 22:46:57.757/M] Starting 8 threads...
[2020-10-31 22:46:57.757/M] Fetching cluster configuration...
[2020-10-31 22:46:57.758/M] Cluster Address: 127.0.0.1:10001
[2020-10-31 22:46:57.758/M] Cluster has 3 masters and 0 replica(s)
[2020-10-31 22:46:57.758/M] Increased maximum number of open files to 10278 (it was originally set to 2560).
[2020-10-31 22:46:57.774/M] All thread(s) started!

redis command exec result (there is only one key "test")

redis-cli -p 7777
127.0.0.1:7777> EVAL "return {KEYS[1],ARGV[1]}" 1 "test" 123
(error) ERR Cross-slot queries are not supported for this command

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions