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

SolrCore clean-up logic uses incorrect path to delete dataDir on failure to create a core

    Details

    • Type: Bug
    • Status: Reopened
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 5.5.2
    • Fix Version/s: 6.7, 7.0
    • Component/s: None
    • Security Level: Public (Default Security Level. Issues are Public)
    • Labels:
      None

      Description

      When a core fails to be created for some reason (errant schema or solrconfig etc.), SolrCore.deleteUnloadedCore() is called from unload() in CoreContainer in order to clean-up the possibly left-over dataDir and instanceDir. The problem is that the CoreDescriptor passed to SolrCore.deleteUnloadedCore() will have its value for dataDir set to just "data/" unless an explicit dataDir was specified by the user in the request to create the core, leading to an attempt to delete simply "data/", which presumably resolves to a non-existent directory under Solr's home directory or some such.

      https://github.com/apache/lucene-solr/blob/branch_5_5/solr/core/src/java/org/apache/solr/core/CoreContainer.java#L974

      https://github.com/apache/lucene-solr/blob/branch_5_5/solr/core/src/java/org/apache/solr/core/SolrCore.java#L2537

        Attachments

        1. SOLR-9433.patch
          4 kB
          Shalin Shekhar Mangar

          Activity

            People

            • Assignee:
              shalinmangar Shalin Shekhar Mangar
              Reporter:
              evansayer Evan Sayer
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated: