Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Typically the FieldMapper should only be newly instantiated if the SolrServer changes. In case a remote SolrServer is configured this needs only to be checked during activation. However if a ManagedSolrServer is configured the SolrServer instance is obtained by a ServiceTracker and therefore a check is needed on every call the ServiceTracker#getService(). Because of that the "currently used" SolrServer instance is cached as a field and compaired with the instance returned by the ServiceTracker.
This Bug is caused by the fact that the SolrServer instance stored in the field is not set. Therefore the equals check fails and a new FieldMapper instance is created on every request.
The initialization of the FIeldMapper reads the namespace prefix config from the SolrCore. Because of that this Bugs causes a lot of unnecessary request to the SolrCore and therefore deceases performance.