Description
Once a core initialization fails, all calls to CoreContainer.getCore() throw an error forever, including the core admin RELOAD command.
I think that RELOAD (and only RELOAD) should go ahead even after initialization failure since it is, after all, reloading everything. For any other core ops since you don't know why the core load failed in the first place you couldn't rely on the state of the core to try to do anything so failing is appropriate.
However, the current structure of the code needs a SolrCore to get the CoreDescriptor which you need to have to, well, reload the core. The work on SOLR-10007 and associated JIRAs should make it possible to get the CoreDescriptor without having to have a core already. Once that's possible, RELOAD will have to distinguish between having a SolrCore already and using the present reload() method or creating a new core.
We could also consider a new core admin API command. It's always bugged me that there's an UNLOAD but no LOAD, we've kinda, sorta, maybe been able to use CREATE.
I think I like making RELOAD smarter though. Consider the scenario where you make a config change that you mess up. You'd have to change to LOAD when RELOAD failed. I can be convinced otherwise though.
Attachments
Attachments
Issue Links
- depends upon
-
SOLR-10009 Explore removing CoreDescriptor from SolrCore
- Resolved
- is part of
-
SOLR-10007 Clean up references to CoreContainer and CoreDescriptors
- Closed
- relates to
-
SOLR-12863 Provide a way in the admin UI to reload cores that failed to start
- Open