lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gregg Donovan (JIRA)" <>
Subject [jira] [Created] (SOLR-4413) SolrCore#getIndexDir() contract change between 3.6 and 4.1
Date Thu, 07 Feb 2013 13:55:12 GMT
Gregg Donovan created SOLR-4413:

             Summary: SolrCore#getIndexDir() contract change between 3.6 and 4.1
                 Key: SOLR-4413
             Project: Solr
          Issue Type: Bug
    Affects Versions: 4.1, 4.0
            Reporter: Gregg Donovan

In [SVN 1420992|], {{SolrCore#getIndexDir()}}
changed it's implementation from a version that would reflect the value of the index property
in {{}} to one that does not. 

In 3.6, {{SolrCore#getIndexDir()}} was:
public String getIndexDir() {
  synchronized (searcherLock) {
    if (_searcher == null)	  	
      return dataDir + "index/";
    SolrIndexSearcher searcher = _searcher.get();
    return searcher.getIndexDir() == null ? dataDir + "index/" : searcher.getIndexDir();

In 3.6, {{SolrIndexSearcher}} would be passed the value of {{SolrCore#getNewIndexDir()}} --
which reads -- in its constructor and return it when {{SolrIndexSearcher#getIndexDir()}}
was called.
In 4.1, {{SolrCore#getIndexDir()}} is:
  public String getIndexDir() {  
    return dataDir + "index/";

Clients of {{SolrCore#getIndexDir()}} that were expecting the previous behavior are likely
to have issues. E.g.:

--In {{CoreAdminHandler#handleUnloadAction(SolrQueryRequest, SolrQueryResponse)}} if the {{deleteIndex}}
flag is set to true, it calls {{core.getDirectoryFactory().remove(core.getIndexDir())}}. If
a value other than {{index/}} is set in {{}}, the wrong directory will be

--In {{CoreAdminHandler#getIndexSize(SolrCore)}}, the existence of {{SolrCore#getIndexDir()}}
is checked before {{SolrCore#getNewIndexDir()}}. If a value other than {{index/}} is set in
{{}}, this will return the size of the wrong directory.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message