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

Creating a core should write a core.properties file first and clean up on failure

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 6.6.1, 6.7, 7.0, 7.1, 8.0
    • None
    • None

    Description

      I've made the handling of core.properties more consistent as part of the pluggable transient core work. However, a new inconsistency came to light. Most of the code assumes that a core.properties file exists, but it wasn't being persisted until the very end of the coreContainer.create process. So any steps part way through core creation that would manipulate the core.properties file wouldn't find it. And if those steps did make a mistake and call persist on the core.properties, create would fail because the core.properties file would be created. Worse, the transient cache handler had no way of knowing whether the core descriptors being added were from create (where the core.properties file hadn't been created yet) or reload/swap/rename. By moving persisting the core.properties earlier in the create process this would be less trappy.

      Any core.properties file created during this process will be removed if the create fails.

      Cores that are simply being loaded on the other hand do not have their core.properties files removed.

      Attachments

        1. SOLR-11122.patch
          22 kB
          Erick Erickson
        2. SOLR-11122.patch
          22 kB
          Erick Erickson

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: