Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-10021

Cannot reload a core if it fails initialization.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 6.5, 7.0
    • None
    • None

    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

        1. SOLR-10021.patch
          8 kB
          Erick Erickson
        2. SOLR-10021.patch
          6 kB
          Mike Drob

        Issue Links

          Activity

            People

              erickerickson Erick Erickson
              erickerickson Erick Erickson
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: