Skip to content
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

Remove WATCH Command in absence of Optimistic Locking #38672

Merged

Commits on Feb 8, 2024

  1. Eliminate WATCH Command in absence of Optimistic Locking

    In scenarios where optimistic locking is disabled, it's unnecessary to use the WATCH command, especially when the subsequent update operation won't be conducted within a transaction (MULTI).
    
    Furthermore, in cases where the value is in the cache and optimistic locking is enabled, invoking the UNWATCH command is required to ensure the connection ceases to monitor the key.
    
    It's worth noting that within transactions executed (EXEC command) or aborted (ABORT command), Redis autonomously handles the UNWATCH operation, removing the need for explicit invocation.
    cescoffier committed Feb 8, 2024
    Configuration menu
    Copy the full SHA
    60f3fc1 View commit details
    Browse the repository at this point in the history