Visitar URL original
Fix replicated lock acquire resend after response timeout by kalayciburak · Pull Request #7368 · redisson/redisson · GitHub
Skip to content

Fix replicated lock acquire resend after response timeout - #7368

Open
kalayciburak wants to merge 1 commit into
redisson:masterfrom
kalayciburak:fix/replicated-lock-acquire-no-retry
Open

kalayciburak wants to merge 1 commit into
redisson:masterfrom
kalayciburak:fix/replicated-lock-acquire-no-retry

Conversation

@kalayciburak

Copy link
Copy Markdown
Contributor

Summary

  • syncedEvalNoRetry dropped the no-retry flag when the config was not single-server, so a timed-out RLock acquire in replicated mode was sent again.
  • The second EVALSHA took the reentrant path and left getHoldCount() at 2 after one tryLock().
  • The batch flush now keeps that flag and does not resend a batch that contains a no-retry command.

Test plan

  • RedissonLockReplicatedTimeoutTest failed first with hold count 2, then passed (hold count <= 1)
  • RedissonLockTest testGetHoldCount, testIsLocked, testLockUnlock, testReentrancy

Fixes #7367

syncedEvalNoRetry dropped the no-retry flag on non-single configs, so a timed-out RLock acquire was sent again and left the hold count at 2.

Fixes redisson#7367

Signed-off-by: kalayciburak <kalayciburak1996@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Replicated servers mode resends the RLock acquire script after a response timeout; one tryLock ends with hold count 2 and the lock is never released

1 participant