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

feat(config): allow to change the max length of the bulk string #2444

Merged
merged 2 commits into from
Jul 25, 2024

Conversation

git-hulk
Copy link
Member

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.

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
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

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.

Copy link
Member Author

@git-hulk git-hulk Jul 25, 2024

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.

Copy link

@PragmaTwice PragmaTwice merged commit 5d287de into apache:unstable Jul 25, 2024
30 checks passed
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

Successfully merging this pull request may close these issues.

Extend limits of max value size to > 1Gb
3 participants