HoustonPutman commented on code in PR #4226:
URL: https://github.com/apache/solr/pull/4226#discussion_r2962157137


##########
solr/core/src/java/org/apache/solr/handler/SchemaHandler.java:
##########
@@ -305,10 +308,28 @@ public Category getCategory() {
     return Category.ADMIN;
   }
 
+  @Override
+  public void initializeMetrics(SolrMetricsContext parentContext, Attributes 
attributes) {
+    // Store parent context so we can use it in inform() to initialize 
sub-handlers as siblings

Review Comment:
   Yeah, so I didn't want to go and change everything here, but I really really 
wished that `initializeMetrics` worked the same across all classes. It seems 
like half of the classes that implement it treat `parentContext` like its own 
context (and generally in those cases `initializeMetrics` is called by the 
constructor which creates the `childContext` itself), and then half actually 
treat it like a `parentContext` and initialize a `childContext` in the method. 
This can get quite confusing trying to figure out where and how these contexts 
are created and managed.



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