cpoerschke commented on a change in pull request #1774:
URL: https://github.com/apache/lucene-solr/pull/1774#discussion_r477438969
##########
File path: solr/core/src/java/org/apache/solr/core/CoreContainer.java
##########
@@ -719,6 +719,7 @@ public void load() {
createHandler(ZK_PATH, ZookeeperInfoHandler.class.getName(),
ZookeeperInfoHandler.class);
createHandler(ZK_STATUS_PATH, ZookeeperStatusHandler.class.getName(),
ZookeeperStatusHandler.class);
collectionsHandler = createHandler(COLLECTIONS_HANDLER_PATH,
cfg.getCollectionsHandlerClass(), CollectionsHandler.class);
+ healthCheckHandler = loader.newInstance(cfg.getHealthCheckHandlerClass(),
HealthCheckHandler.class, null, new Class<?>[]{CoreContainer.class}, new
Object[]{this});
Review comment:
> ... I did this because `createHandler` also registers the handler to a
path and initializes metrics. HealthCheckHandler currently is ran inside
InfoHandler, so that's where the path is registered (and I guess the metrics
are merged there). ...
I wonder if it would be helpful to have that as a comment in the code for
future reference, the bit about not wishing to register to a path and
initialise metrics.
As far as I can tell `InfoHandler` does not do any metric initialisation, so
the health check handler would then be consistent with the other handlers whose
path is registered in `InfoHandler`. Or maybe I'm missing how the metrics
initialisation happens indirectly?
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]