[ 
https://issues.apache.org/jira/browse/SOLR-1962?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mark Miller resolved SOLR-1962.
-------------------------------

    Resolution: Fixed

> Index directory disagreement SolrCore#initIndex
> -----------------------------------------------
>
>                 Key: SOLR-1962
>                 URL: https://issues.apache.org/jira/browse/SOLR-1962
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 1.4, 1.4.1
>            Reporter: Mark Miller
>            Assignee: Mark Miller
>            Priority: Minor
>             Fix For: 3.1, 4.0
>
>         Attachments: SOLR-1962.patch
>
>
> getNewIndexDir is widely used in this method - but then when a new index is 
> created, getIndexDir is used:
> {code}
>       // Create the index if it doesn't exist.
>       if(!indexExists) {
>         log.warn(logid+"Solr index directory '" + new File(getNewIndexDir()) 
> + "' doesn't exist."
>                 + " Creating new index...");
>         SolrIndexWriter writer = new SolrIndexWriter("SolrCore.initIndex", 
> getIndexDir(), getDirectoryFactory(), true, schema, 
> solrConfig.mainIndexConfig, solrDelPolicy);
>         writer.close();
>       }
> {code}
> also this piece uses getIndexDir():
> {code}
>       if (indexExists && firstTime && removeLocks) {
>         // to remove locks, the directory must already exist... so we create 
> it
>         // if it didn't exist already...
>         Directory dir = SolrIndexWriter.getDirectory(getIndexDir(), 
> getDirectoryFactory(), solrConfig.mainIndexConfig);
>         if (dir != null)  {
>           if (IndexWriter.isLocked(dir)) {
>             log.warn(logid+"WARNING: Solr index directory '" + getIndexDir() 
> + "' is locked.  Unlocking...");
>             IndexWriter.unlock(dir);
>           }
>           dir.close();
>         }
>       }
> {code}

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to