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

command redis-memory-for-key is dangerous #154

Open
hoswey opened this issue May 7, 2019 · 0 comments
Open

command redis-memory-for-key is dangerous #154

hoswey opened this issue May 7, 2019 · 0 comments

Comments

@hoswey
Copy link

hoswey commented May 7, 2019

As the redis-memory-for-key will call dump command of the redis

For large key, the dump command will block redis as it's Time complexity. So this command is very dangerous for production environment.

Time complexity: O(1) to access the key and additional O(NM) to serialized it, where N is the number of Redis objects composing the value and M their average size. For small string values the time complexity is thus O(1)+O(1M) where M is small, so simply O(1).

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