Skip to content

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.

@sonarqubecloud
Copy link

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