Solr
  1. Solr
  2. SOLR-1214

differentiate between solr home and instanceDir

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.4
    • Component/s: None
    • Labels:
      None

      Description

      There is a lot of confusion on what is an instanceDir in a multicore system. The CoreContainer must have a field for solrHome and the instanceDir for each core should be specific to that core

      1. SOLR-1214.patch
        3 kB
        Shalin Shekhar Mangar
      2. SOLR-1214.patch
        6 kB
        Noble Paul
      3. SOLR-1214.patch
        6 kB
        Noble Paul

        Issue Links

          Activity

          Hide
          Noble Paul added a comment -
          • the locateInstanceDir is deprecated. it is renamed to locateSolrHome
          • The instanceDir is same as solrhome for a single core solr . For multicore there is no real relationship with solrhome and instancedir of a core.
          Show
          Noble Paul added a comment - the locateInstanceDir is deprecated. it is renamed to locateSolrHome The instanceDir is same as solrhome for a single core solr . For multicore there is no real relationship with solrhome and instancedir of a core.
          Hide
          Noble Paul added a comment -

          I plan to commit this in a day or two. please comment

          Show
          Noble Paul added a comment - I plan to commit this in a day or two. please comment
          Hide
          Yonik Seeley added a comment -

          Could you perhaps give a "before" and "after" example of what the solr.xml will actually look like? That will make it much easier for people to evaluate.

          Show
          Yonik Seeley added a comment - Could you perhaps give a "before" and "after" example of what the solr.xml will actually look like? That will make it much easier for people to evaluate.
          Hide
          Noble Paul added a comment -

          There is no change to solr.xml. Actually there is no external change.

          This just changes the conventions inside the code.

          • This deprecates the method SolrResourceLoader#locateInstanceDir() it will be called locateSolrHome
          • CoreContainer will keep a field solrHome
          Show
          Noble Paul added a comment - There is no change to solr.xml. Actually there is no external change. This just changes the conventions inside the code. This deprecates the method SolrResourceLoader#locateInstanceDir() it will be called locateSolrHome CoreContainer will keep a field solrHome
          Hide
          Noble Paul added a comment -

          committed r786434

          Show
          Noble Paul added a comment - committed r786434
          Hide
          Shalin Shekhar Mangar added a comment -

          Re-opening because of test failures in MultiCoreEmbeddedTest, MergeIndexesEmbeddedTest and TestReplicationHandler due to incorrect solr home path (SOLR-1239)

          Show
          Shalin Shekhar Mangar added a comment - Re-opening because of test failures in MultiCoreEmbeddedTest, MergeIndexesEmbeddedTest and TestReplicationHandler due to incorrect solr home path ( SOLR-1239 )
          Hide
          Shalin Shekhar Mangar added a comment - - edited

          Changes:

          1. Remove the CoreContainer(String home) constructor and un-deprecated the default no-param constructor
          2. Initialize solrHome in CoreContainer() and CoreContainer(SolrResourceLoader loader) and CoreContainer#load() methods to tackle cases where solrHome is not set or load is called with a different directory than solrHome.
          3. Use SolrResourceLoader#locateSolrHome instead of the deprecated locateInstanceDir method

          All tests pass. I'll commit this shortly.

          Show
          Shalin Shekhar Mangar added a comment - - edited Changes: Remove the CoreContainer(String home) constructor and un-deprecated the default no-param constructor Initialize solrHome in CoreContainer() and CoreContainer(SolrResourceLoader loader) and CoreContainer#load() methods to tackle cases where solrHome is not set or load is called with a different directory than solrHome. Use SolrResourceLoader#locateSolrHome instead of the deprecated locateInstanceDir method All tests pass. I'll commit this shortly.
          Hide
          Shalin Shekhar Mangar added a comment -

          Committed revision 787967.

          Show
          Shalin Shekhar Mangar added a comment - Committed revision 787967.
          Hide
          Grant Ingersoll added a comment -

          Bulk close for Solr 1.4

          Show
          Grant Ingersoll added a comment - Bulk close for Solr 1.4

            People

            • Assignee:
              Noble Paul
              Reporter:
              Noble Paul
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development