stillalex commented on code in PR #1780:
URL: https://github.com/apache/solr/pull/1780#discussion_r1266163119
##########
solr/core/src/java/org/apache/solr/servlet/ServletUtils.java:
##########
@@ -216,16 +217,19 @@ static void rateLimitRequest(
}
if (!accepted) {
- String errorMessage =
- "Too many requests for this request type."
- + "Please try after some time or increase the quota for this
request type";
-
- response.sendError(429, errorMessage);
+ response.sendError(ErrorCode.TOO_MANY_REQUESTS.code,
RateLimitManager.ERROR_MESSAGE);
+ return;
}
+ needsCleanup = false;
// todo: this shouldn't be required, tracing and rate limiting should be
independently
// composable
traceHttpRequestExecution2(request, response, limitedExecution, trace);
} finally {
+ if (needsCleanup) {
+ consumeInputFully(request, response);
+ SolrRequestInfo.reset();
+ SolrRequestParsers.cleanupMultipartFiles(request);
Review Comment:
thank you for offering. I will try to clean this up and at the same time
reduce collateral changes as much as possible.
--
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]