Repository navigation
Limit key size - #1968
Closed
camilo wants to merge 2 commits into
Closed
Limit key size#1968camilo wants to merge 2 commits into
camilo wants to merge 2 commits into
Conversation
added 2 commits
August 17, 2014 17:14
This commit adds a check on every write command, that will err the command if any of the keys is longt er than some arbitrary limit, if this is deemed not terrible, I'll follow up with a commit that makes the max key size a configurable parameter.
Contributor
|
You should base this PR on |
Contributor
|
[dead, replaced by #1975] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
I've observed redis servers eat up all the machines memory and get into swapping causing issues on the clients, when a bug or just careless usage introduces very large keys (100s of MBs).
What is here?
This adds the
max-key-sizeconfig option, when the value of that option is not null keys longer than the number in bytes defined will be rejected.I'm PRing against 2.8, I can move it to 3.x if there is interest.
Topic on the google group: https://groups.google.com/forum/#!topic/redis-db/aLxpHURnA8Q
/cc @csfrancis, @fbosany
what do you think ? @antirez @pietern