-
Notifications
You must be signed in to change notification settings - Fork 950
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
lua scripts readonly error on slave replica #4130
Comments
Why it is a bug? hincrby and pexpire are not allowed on replica. |
that should be sent to the primary, and the client does not know which is the primary or replica |
sounds like a configuration issue with your client then. you should connect it to the primary |
no, if your client is connected to dragonfly to port 16380 and this dragonfly is a master it should just work. can you post |
Describe the bug
A clear and concise description of what the bug is.
org.redisson.client.RedisException: ERR Error running script (call to 149c5a8bf18676fd99e9e6e24923bd64d9b62f94):
@user_script:2: -READONLY You can't write against a read only replica..
channel: [id: 0xd5d027a5, L:/100.64.0.3:58328 - R:dev.ip.local/172.18.78.49:16380]
command: (EVAL),
params: [if ((redis.call('exists', KEYS[1]) == 0) or (redis.call('hexists', KEYS[1], ARGV[2]) == 1)) then redis.call('hincrby', KEYS[1], ARGV[2], 1); redis.call('pexpire', KEYS[1], ARGV[1]); return nil; end; return redis.call('pttl', KEYS[1]);, 1, fabric.Lock.OPERATION_LOG.lock, 5000, 2f3c8128-65f1-42e8-8b6a-4c910db0b75d:183],
promise: java.util.concurrent.CompletableFuture@2b83f94d[Not completed, 1 dependents]
at org.redisson.client.handler.CommandDecoder
To Reproduce
Steps to reproduce the behavior:
lua scripts:
See error
@user_script:2: -READONLY You can't write against a read only replica.. channel
Expected behavior
no error
Environment (please complete the following information):
uname -a
dragonfly-operator 1.1.8,2 replica
Reproducible Code Snippet
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: