[
https://issues.apache.org/jira/browse/SOLR-10009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15840646#comment-15840646
]
Erick Erickson commented on SOLR-10009:
---------------------------------------
I've been digging into this and I think the approach should be to break out the
core descriptors into better list keeping. Currently we have
SolrCore.coreDescriptor and dynamicDescriptors. The dynamicDescriptors is a map
that handles transient cores and cores with loadOnStartup=false.
So what that means is that for "dynamicDescriptors", there's a copy in a list
in SolrCores _and_ there's a copy in the SolrCore itself. Meanwhile for
"regular" cores there's only the copy in SolrCore. This leads to confusion
about where the _real_ CoreDescriptor is, which gave us headaches for
persisting.
Then we have a "name" in the CoreDescriptor and a "name" in the SolrCore that
both need to be kept in sync. See SolrCore.setName in the current code. I don't
think we reference the core name often enough to make an extra level of
indirection be noticeable so I'm also thinking of moving the "name" var from
SolrCore.
So what I'm looking at is
1> pull coreDescriptor out of SolrCore (done for PoC, testing now)
2> pull "name" out of SolrCore and go get the name from CoreDescriptor (not
done yet).
3> rename a few variables in SolrCore. I was about to go overboard and propose
that the ulogDir and dataDir be kept in the CoreDescriptor only, but then
realized they are actually something quite different than a simple String. But
something like resolvedUlogDir might be clearer.
What I'm dithering about is whether there really should be a CoreDescriptors
class (note the 's') whose job is to keep track of just CoreDescriptors
analogous to SolrCore/SolrCores. Having the CoreDescriptors scattered about the
SolrCores in two lists seems rife for error.
I considered enhancing CoresLocator, but that seems inappropriate.
[~romseygeek] do you have an opinion? about this or anything else for that
matter?
> 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.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]