-
Notifications
You must be signed in to change notification settings - Fork 504
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
feat(config): allow to change the max length of the bulk string #2444
feat(config): allow to change the max length of the bulk string #2444
Conversation
Currently, the proto's max length of bulk string is hard code to 512MiB, and it's impossible to create a string value more than that. And Redis allows to change this value by the configuration `proto-max-bulk-len`, so we also just add this to align the behavior.
# By default, the max length of bulk string is limited to 512MB. If you want to | ||
# change this limit to a different value(must >= 1MiB), you can use the following configuration. | ||
# | ||
# proto-max-bulk-len 536870912 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it be in MB or KB?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I had thought about this. However the configuration's name didn't indicate the unit, so I think it will be better to use bytes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use ParseSizeAndUnit
here, or you can rename it to proto-max-bulk-len-mb.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, the config rewrite will change it to the number of bytes. I have created an issue to support this: #2445, and we can disallow using unit
as the suffix of the configuration.
|
This closes #2399.
Currently, the proto's max length of the bulk string is hard coded to 512MiB, and it's impossible to create a string value more than that. And Redis allows us to change this value by the configuration
proto-max-bulk-len
, so we also just add this to align the behavior.