flyrain commented on code in PR #276:
URL: https://github.com/apache/polaris/pull/276#discussion_r1762075797
##########
polaris-service/src/main/java/org/apache/polaris/service/config/PolarisApplicationConfig.java:
##########
@@ -146,6 +149,23 @@ public void setFeatureConfiguration(Map<String, Object>
featureConfiguration) {
this.configurationStore = new
DefaultConfigurationStore(featureConfiguration);
}
+ @JsonProperty("maxRequestBodyBytes")
+ public void setMaxRequestBodyBytes(long maxRequestBodyBytes) {
+ if (maxRequestBodyBytes <= 0 && maxRequestBodyBytes != -1) {
+ // The underlying library that we use to implement the limit treats all
values <= 0 as the
+ // same, so we block all but -1 to prevent ambiguity.
+ throw new IllegalArgumentException(
+ String.format(
+ "maxRequestBodyBytes must be a positive integer or %d to specify
no limit.",
+ REQUEST_BODY_BYTES_NO_LIMIT));
+ }
Review Comment:
minor suggestion:
```
Preconditions.checkArgument(condition, message);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]