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

Erick Erickson commented on SOLR-10009:
---------------------------------------

[~dsmiley] Point taken about CoreDescriptors, although it would follow the 
model of SolrCore/SolrCores. I'm still not sure I even want to, I'll figure 
that out Real Soon Now though.

As far as why it's not all just in CoreContainer. I didn't do that bit of code, 
but CoreContainer is a big class with duties for coordinating locks and all 
that. It does contain a SolrCores member variable so I believe it's just about 
tidiness.


On a different topic, removing the "name" parameter from SolrCore I've poked 
around in this a bit more. I can't pull it out completely and _still_ remove 
the copy of the CoreDescriptor as we have to have some key to _get_ the 
CoreDescriptor associated with this core. The motivation for removing the 
CoreDescriptor from SolrCore is that we have two copies of it: one in the 
various CoreDescriptor lists and one in the SolrCore itself, leading to race 
conditions.

The copy serves one purpose that I can tell: allows core swapping. We replace 
the CoreDescriptor that was in SolrCore with a new copy with a different name 
at the same time we do the swap. We do the swap in two separate 
SolrCore.setName calls, depending on having copies laying around to keep these 
accurate. I'll change the code to no longer require a setName with side effects 
and swap the CoreDescriptors in the swap method. There should be no need at 
that point for a setName method.

All subject to change as I dig further.

> Explore removing CoreDescriptor from SolrCore
> ---------------------------------------------
>
>                 Key: SOLR-10009
>                 URL: https://issues.apache.org/jira/browse/SOLR-10009
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Erick Erickson
>            Assignee: Erick Erickson
>
> There should be one place where the CoreDescriptor resides, not a copy in 
> CoreContainer and one in SolrCore. Changing and persisting these from one 
> place or the other leads to inconsistencies.
> This JIRA is partly to get the discussion going of how to untangle these.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to