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 2013/06/05 07:46:20 UTC

[jira] [Commented] (STANBOL-1081) ReferencedSolrServer does not work with Solr 4

    [ https://issues.apache.org/jira/browse/STANBOL-1081?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13675626#comment-13675626 ] 

Rupert Westenthaler commented on STANBOL-1081:
----------------------------------------------

The changed SolrServerAdapter now overrides the following Methods of the CoreContainer

* create(CoreDescriptior): To ensure that the OsgiSolrResourceLoader is used to init the SolrCore. NOTE: that ZooKeeper maanaged cores are not yet supported. If a ZooKeeper Controller is present, the supoer implementation is called (what will likely cause Exceptions during initialisation of the Core)
* register(Map<String,SolrCore>, String, SolrCore, boolesn): To ensure that registered SolrCores are registered as OSGI services. NOTE the special case where registration is posponed during the initial creation of the SolrCore because this can cause a deadlock (see comments in the source for details)
* swap(String, String): To ensure that the OSGI serviceRegistration are updated accordingly

Additional Changes:

* The methods of the SolrServerAdapter corresponding to the now overridden methods of the wrapped CoreContainer where accordingly adapted
* The SolrServerAdapter does now hold an reference count on managed SolrCores. This prevents the close of SolrCores shortly after the first registration (In previous versions users should have noticed the same SolrCore to be initialised twice because of that)
* The SolrServerAdapter does no longer decrease the reference count until it reaches zero. This will avoid the Solr Error Messages about negative reference counts, but also requires that other OSGI components to correctly call SolrCore#close(). However an investigation of the current usage as shown that mist likely EmbeddedSolrServers will be used to use obtained CoreContainers and the  EmbeddedSolrServer does correctly call close() on each obtained SolrCore.
                
> ReferencedSolrServer does not work with Solr 4
> ----------------------------------------------
>
>                 Key: STANBOL-1081
>                 URL: https://issues.apache.org/jira/browse/STANBOL-1081
>             Project: Stanbol
>          Issue Type: Bug
>          Components: Commons
>            Reporter: Rupert Westenthaler
>            Assignee: Rupert Westenthaler
>
> The ReferencedSolrServer is not yet functional to the Solr 4 related changes in the commons.solr module. This is because in the case of the ReferencedSolrServer SolrCores are initialized in the constructor of the SolrServerAdapter (commons.solr.core), but this does not yet ensure that the OsgiSolrResourceLoader is used in that process. Because of that the ReferencedSolrServer can not load SolrCores that do use Analyzers that are not directly contained in the commons.solr.core bundle (e.g. ICU, SmartCN, ...)
> To solve this on needs to generalize the solution used to manually register SolrCores so that it does work for any SolrCore created by the CoreContainer (wrapped by the SolrServerAdapter).
> After some investigation it looks like overriding the "create(CoreDescriptor cd) : SolrCore" would be the best option to achieve this goal. Parsing the OsgiSolrResourceLoader in the constructor of the CoreContainer does not work as this is overridden by the CoreContainer.load(..) method.

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