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

To delete the key acquired in Redlock, it's better to have builtin command over lua script #6360

Open
workplaylifecycle opened this issue Sep 4, 2019 · 1 comment

Comments

@workplaylifecycle
Copy link
Contributor

redlock#correct-impl here we need lua script just for atomic execution of Get Test Del, get and del raised comnmand against redis-server, test check in lua code, why not merge three step into one instruction, all in server side, let's say delvm, delvm key_nice value_fine only delete key of key_nice has value of value_fine, if there is no such key or value not match value_fine then reply 0, otherwise delete key and reply 1.
I totally understand how lua works out there, but something builtin is more solid, sophisticated, let's say, why do we have setnx, we can impl it in lua right, but we have now people choose it over lua way, because builtin command is simpler for developers

@workplaylifecycle
Copy link
Contributor Author

and there are some other reasons, like if we have standalone delvm command, we can easily monitor it, but we can't if using lua; in some production environment, eval command is commented out for security reason, client is not able to call eval

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant