You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by "Rupert Westenthaler (JIRA)" <ji...@apache.org> on 2012/12/15 20:08:12 UTC

[jira] [Created] (STANBOL-844) SolrYard creates new FieldMapper instance on every request when configured with a ManagedSolrServer

Rupert Westenthaler created STANBOL-844:
-------------------------------------------

             Summary: SolrYard creates new FieldMapper instance on every request when configured with a ManagedSolrServer
                 Key: STANBOL-844
                 URL: https://issues.apache.org/jira/browse/STANBOL-844
             Project: Stanbol
          Issue Type: Bug
          Components: Entityhub
            Reporter: Rupert Westenthaler
            Assignee: Rupert Westenthaler


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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira