atris commented on a change in pull request #1686:
URL: https://github.com/apache/lucene-solr/pull/1686#discussion_r466813189



##########
File path: solr/core/src/java/org/apache/solr/servlet/RateLimitManager.java
##########
@@ -38,9 +41,14 @@
  * rate limiting is being done for a specific request type.
  */
 public class RateLimitManager {
+  private static final Logger log = 
LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+
   public final static int DEFAULT_CONCURRENT_REQUESTS= 
(Runtime.getRuntime().availableProcessors()) * 3;
   public final static long DEFAULT_SLOT_ACQUISITION_TIMEOUT_MS = -1;
   private final Map<String, RequestRateLimiter> requestRateLimiterMap;
+
+  // IMPORTANT: The slot from the corresponding rate limiter should be 
acquired before adding the request
+  // to this map. Subsequently, the request should be deleted from the map 
before the slot is released.
   private final Map<HttpServletRequest, RequestRateLimiter> activeRequestsMap;

Review comment:
       This is already a ConcurrentHashMap. The comment is redundant, removing.




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to