kfaraz commented on code in PR #14859:
URL: https://github.com/apache/druid/pull/14859#discussion_r1297080450


##########
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:
   Since the only use of `timeoutMs` is in this method, maybe we should do the 
rounding off in the constructor itself.



-- 
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]

Reply via email to