Solr
  1. Solr
  2. SOLR-5099

The core.properties not created during collection creation

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 4.5, 5.0
    • Fix Version/s: 4.5, 5.0
    • Component/s: SolrCloud
    • Labels:
      None

      Description

      When using the new solr.xml structure. The core auto discovery mechanism trying to find core.properties.
      But I found the core.properties cannot be create when I dynamically create a collection.
      The root issue is the CorePropertiesLocator trying to create properties before the instanceDir is created.
      And collection creation process will done and looks fine at runtime, but it will cause issues (cores are not auto discovered after server restart).

        Issue Links

          Activity

          Hide
          Adrien Grand added a comment -

          4.5 release -> bulk close

          Show
          Adrien Grand added a comment - 4.5 release -> bulk close
          Hide
          Alan Woodward added a comment -

          Thanks Mark!

          Show
          Alan Woodward added a comment - Thanks Mark!
          Hide
          Mark Miller added a comment -

          I added an explicit test to make sure the cores.properties file is created.

          Show
          Mark Miller added a comment - I added an explicit test to make sure the cores.properties file is created.
          Hide
          Mark Miller added a comment -

          For bug fixes to unreleased issues that a non committer contribs towards, we should add credit to the issue that caused the bug. If it's minor in comparison to the original issue, we tend to create sub Changes entries - see some previous examples in Changes. I'll make an update here.

          Show
          Mark Miller added a comment - For bug fixes to unreleased issues that a non committer contribs towards, we should add credit to the issue that caused the bug. If it's minor in comparison to the original issue, we tend to create sub Changes entries - see some previous examples in Changes. I'll make an update here.
          Hide
          ASF subversion and git services added a comment -

          Commit 1514858 from Mark Miller in branch 'dev/branches/branch_4x'
          [ https://svn.apache.org/r1514858 ]

          SOLR-5164: add relative solr.home testing to some tests, explicitly check for expected instanceDir handling with relative solr.home
          SOLR-5099: explicity check for proper solrcore.properties creation
          Speed up some tests by setting leaderVoteWait to 0

          Show
          ASF subversion and git services added a comment - Commit 1514858 from Mark Miller in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1514858 ] SOLR-5164 : add relative solr.home testing to some tests, explicitly check for expected instanceDir handling with relative solr.home SOLR-5099 : explicity check for proper solrcore.properties creation Speed up some tests by setting leaderVoteWait to 0
          Hide
          ASF subversion and git services added a comment -

          Commit 1514857 from Mark Miller in branch 'dev/trunk'
          [ https://svn.apache.org/r1514857 ]

          SOLR-5164: add relative solr.home testing to some tests, explicitly check for expected instanceDir handling with relative solr.home
          SOLR-5099: explicity check for proper solrcore.properties creation
          Speed up some tests by setting leaderVoteWait to 0

          Show
          ASF subversion and git services added a comment - Commit 1514857 from Mark Miller in branch 'dev/trunk' [ https://svn.apache.org/r1514857 ] SOLR-5164 : add relative solr.home testing to some tests, explicitly check for expected instanceDir handling with relative solr.home SOLR-5099 : explicity check for proper solrcore.properties creation Speed up some tests by setting leaderVoteWait to 0
          Hide
          Erick Erickson added a comment -

          FWIW, a separate test case would be fine here, but note that the actual fix is part of SOLR-5164. I didn't see Herb's patch until after I'd found it as part of SOLR-5164

          Show
          Erick Erickson added a comment - FWIW, a separate test case would be fine here, but note that the actual fix is part of SOLR-5164 . I didn't see Herb's patch until after I'd found it as part of SOLR-5164
          Hide
          Mark Miller added a comment -

          We need a test for this as well - I'm happy to do it if no one else does, but lets not resolve these types of bugs until we have tests for htem.

          Show
          Mark Miller added a comment - We need a test for this as well - I'm happy to do it if no one else does, but lets not resolve these types of bugs until we have tests for htem.
          Hide
          ASF subversion and git services added a comment -

          Commit 1514684 from Erick Erickson in branch 'dev/branches/branch_4x'
          [ https://svn.apache.org/r1514684 ]

          SOLR-5164, Can not create a collection via collections API (cloud mode). Fixes SOLR-5099 too

          Show
          ASF subversion and git services added a comment - Commit 1514684 from Erick Erickson in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1514684 ] SOLR-5164 , Can not create a collection via collections API (cloud mode). Fixes SOLR-5099 too
          Hide
          ASF subversion and git services added a comment -

          Commit 1514666 from Erick Erickson in branch 'dev/trunk'
          [ https://svn.apache.org/r1514666 ]

          SOLR-5164, Can not create a collection via collections API (cloud mode). Fixes SOLR-5099 too

          Show
          ASF subversion and git services added a comment - Commit 1514666 from Erick Erickson in branch 'dev/trunk' [ https://svn.apache.org/r1514666 ] SOLR-5164 , Can not create a collection via collections API (cloud mode). Fixes SOLR-5099 too
          Hide
          Erick Erickson added a comment -

          Herb:

          I stumbled across this as well. I sure wish I'd paid more attention to this JIRA before, you'd have saved me a couple of hours of head-scratching..... Nice sleuthing, you nailed the problem.

          Anyway, I'll check in the fixes for SOLR-5164 this morning and this will be fixed.

          Show
          Erick Erickson added a comment - Herb: I stumbled across this as well. I sure wish I'd paid more attention to this JIRA before, you'd have saved me a couple of hours of head-scratching..... Nice sleuthing, you nailed the problem. Anyway, I'll check in the fixes for SOLR-5164 this morning and this will be fixed.
          Hide
          Alan Woodward added a comment -

          This is because creating a core in normal mode requires that the instance dir is already present, but creation via SolrCloud allows you to load all config from zookeeper, and so doesn't need an actual instance dir. Nice catch.

          I'll add a test for the Collections API as well.

          Show
          Alan Woodward added a comment - This is because creating a core in normal mode requires that the instance dir is already present, but creation via SolrCloud allows you to load all config from zookeeper, and so doesn't need an actual instance dir. Nice catch. I'll add a test for the Collections API as well.
          Hide
          Herb Jiang added a comment -

          check instanceDir and mkdirs before write the core.properties.

          Show
          Herb Jiang added a comment - check instanceDir and mkdirs before write the core.properties.

            People

            • Assignee:
              Mark Miller
              Reporter:
              Herb Jiang
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development