-
Hello @rueian, Line 334 in fc56243 Is it intentional to share this err variable when acquiring a lock?If I have key majority is 2 and the first lock acquiring loop is error ErrNotLocked , then the second lock acquiring is automatically failed with same error without sending command to Redis.Thank you. |
Beta Was this translation helpful? Give feedback.
Answered by
rueian
Jul 2, 2025
Replies: 1 comment 1 reply
-
Hi @dntam00, Yes, it is intentional. The client tries to take a lock by setting the corresponding keys in sequence. For example, if your key majority is 2 and you try to acquire a lock "my_lock", it will send the following requests sequentially:
If any of them fail with |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
dntam00
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @dntam00,
Yes, it is intentional. The client tries to take a lock by setting the corresponding keys in sequence. For example, if your key majority is 2 and you try to acquire a lock "my_lock", it will send the following requests sequentially:
If any of them fail with
ErrNotLocked
means the lock is still held by others and no need to continue.