Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
9.6
-
None
Description
Solr endpoint /solr/admin/info/system is used to return some generic system metrics (memory, JVM...)
This endpoint is also used by solr-operator by default for start-up probe and liveness probe. (details here). Very long runtime can cause failures of the probes.
Runtime is abnormally slow because of the time spent in introspecting beans to create BeanInfo instances. Most of the time is spent here:
java.lang.Exception: Stack trace at java.desktop/java.beans.Introspector.getBeanInfo(Introspector.java:279) at org.apache.solr.util.stats.MetricUtils.addMXBeanMetrics(MetricUtils.java:777) at org.apache.solr.util.stats.MetricUtils.addMXBeanMetrics(MetricUtils.java:841) at org.apache.solr.handler.admin.SystemInfoHandler.getSystemInfo(SystemInfoHandler.java:223) at org.apache.solr.handler.admin.SystemInfoHandler.handleRequestBody(SystemInfoHandler.java:156) at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:248) at org.apache.solr.handler.admin.InfoHandler.handle(InfoHandler.java:96) at org.apache.solr.handler.admin.InfoHandler.handleRequestBody(InfoHandler.java:84) at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:248)
There is no need to execute the bean introspection at each call. We could lazily instantiate them and keep them in memory for efficiency.
Note: I haven't been able to figure out the exact cause, but the runtime can exponentially increase under heady querying load.