gus-asf commented on code in PR #4120:
URL: https://github.com/apache/solr/pull/4120#discussion_r2785040094


##########
solr/test-framework/src/java/org/apache/solr/embedded/JettySolrRunner.java:
##########
@@ -423,10 +425,14 @@ public void contextInitialized(ServletContextEvent event) 
{
       rateLimitFilter = 
root.getServletHandler().newFilterHolder(Source.EMBEDDED);
       rateLimitFilter.setHeldClass(RateLimitFilter.class);
 
-      // Ratelimit Requests
+      // Trace Requests

Review Comment:
   For me at least, sectioning code makes it easier to read quickly. And while 
some of these comments are a bit obvious, others are more helpful and having a 
consistent cadence to the sections helps (IMHO). I try to add comments and 
organize code from the perspective of someone who is arriving at the code to 
troubleshoot some downstream issue, and what they really need is to find the 
bit of code that relates to the thing they are actually working on or fixing 
(e.g. tracing, or rate limiting). In the case of JettySolrRunner, I imagine the 
most common question relating to these filters will be things like (what order 
does X get applied in, does X and it's predecessors/successors match the 
web.xml, or how does the test for X that I'm working on initialize X). So I 
think it's key to be able to glance-read the filters here.
   
   I'm also not fond of the "extra filters"  and "extra servlets" bit just 
above, and I think it might not ever be used, but that's for another ticket.



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