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

CachingDirectoryFactory subclasses must init directory with NoLockFactory, because the real lock factory gets set later via injectLockFactory

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.0
    • Fix Version/s: 6.0
    • Component/s: None
    • Labels:
      None

      Description

      The whole setup should really be changed in Solr trunk, especially as we want to make the lockfactory non-mutable (set via directory ctor).

      As workaround to prevent SimpleFSLockFactory from creating the lock directory initially, we should pass NoLockFactory in the create method. This is possible because injectLockFactory will set the "configured one" afterwards.

      This change is needed in trunk, because the LockFactory creates the directory in its ctor, which leads to problems with NIO2.

      In addition, the SlrCore.newSolrDataDir does not cleanup and close the directory correctly if an error occurs.

        Attachments

        1. SOLR-6518.patch
          9 kB
          Uwe Schindler

          Issue Links

            Activity

              People

              • Assignee:
                uschindler Uwe Schindler
                Reporter:
                uschindler Uwe Schindler
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: