-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add maxEncodeSize configuration for zstd compression #11361
Add maxEncodeSize configuration for zstd compression #11361
Conversation
@yawkat @graemerocher @dstepanov I hope that I did everything right and I will be glad to receive a review. I can't write tests because its need to add a library https://github.com/luben/zstd-jni and i can't do it, because it's not in netty-bom and I can't connect it transitively because it's declared with optional=true in netty poms, I'm not sure about its license, so I didn't add it to libs.versions.toml |
/** | ||
* @return The maximum size of data that can be encoded using the zstd algorithm. | ||
*/ | ||
int getMaxZstdEncodeSize(); |
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.
Please add a default implementation for compatibility
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.
it already there
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.
Could we add a test?
I'm not sure about this dependency, but formally we can
|
Also i've tested it manually and it works on my local but i didn't run any auto tests |
As mentioned in #11343, Zstd encoder in Netty has a unique parameter of maxEncoded size, and if users of Micronaut want to use Zstd with files more than ≈31Mb Netty will throw an exception like "requested encode buffer size exceeds the maximum allowable size) so I thing we should enable change this parameters for MK's users if they would like to handle bigger files at MK server