kfaraz commented on code in PR #14859:
URL: https://github.com/apache/druid/pull/14859#discussion_r1297119770
##########
server/src/main/java/org/apache/druid/server/initialization/jetty/JettyBindings.java:
##########
@@ -94,10 +94,15 @@ public Class<? extends Filter> getFilterClass()
@Override
public Map<String, String> getInitParameters()
{
- if (timeoutMs >= 0) {
- return ImmutableMap.of("maxRequests", String.valueOf(maxRequests),
"suspendMs", String.valueOf(timeoutMs));
+ if (timeoutMs < 0) {
+ return ImmutableMap.of("maxRequests", String.valueOf(maxRequests));
}
- return ImmutableMap.of("maxRequests", String.valueOf(maxRequests));
+ if (timeoutMs > Integer.MAX_VALUE) {
+ // QoSFilter tries to parse the suspendMs parameter as an int, so we
can't set it to more than Integer
Review Comment:
Well, it kind of is two separate pieces of logic. One is the max allowed
value of `timeoutMs` and the other is construction of the map. I am okay either
way though. It is just that the current flow is doing something silently
without ever giving any feedback to the user.
I would even suggest just making the `timeoutMs` an `int` instead of a
`long`. But if you feel strongly, we can proceed with it as is for now.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]