[jira] Created: (SOLR-1962) Index directory disagreement SolrCore#initIndex

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (SOLR-1962) Index directory disagreement SolrCore#initIndex

JIRA jira@apache.org
Index directory disagreement SolrCore#initIndex
-----------------------------------------------

                 Key: SOLR-1962
                 URL: https://issues.apache.org/jira/browse/SOLR-1962
             Project: Solr
          Issue Type: Bug
            Reporter: Mark Miller
            Assignee: Mark Miller
             Fix For: Next


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}



--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (SOLR-1962) Index directory disagreement SolrCore#initIndex

JIRA jira@apache.org

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

Mark Miller updated SOLR-1962:
------------------------------

    Description:
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}


  was:
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}




> Index directory disagreement SolrCore#initIndex
> -----------------------------------------------
>
>                 Key: SOLR-1962
>                 URL: https://issues.apache.org/jira/browse/SOLR-1962
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Mark Miller
>            Assignee: Mark Miller
>             Fix For: Next
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (SOLR-1962) Index directory disagreement SolrCore#initIndex

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

Mark Miller updated SOLR-1962:
------------------------------

    Priority: Minor  (was: Major)

> Index directory disagreement SolrCore#initIndex
> -----------------------------------------------
>
>                 Key: SOLR-1962
>                 URL: https://issues.apache.org/jira/browse/SOLR-1962
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Mark Miller
>            Assignee: Mark Miller
>            Priority: Minor
>             Fix For: Next
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (SOLR-1962) Index directory disagreement SolrCore#initIndex

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

Mark Miller updated SOLR-1962:
------------------------------

    Attachment: SOLR-1962.patch

A patch to clean this up.

> Index directory disagreement SolrCore#initIndex
> -----------------------------------------------
>
>                 Key: SOLR-1962
>                 URL: https://issues.apache.org/jira/browse/SOLR-1962
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Mark Miller
>            Assignee: Mark Miller
>            Priority: Minor
>             Fix For: Next
>
>         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.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (SOLR-1962) Index directory disagreement SolrCore#initIndex

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/SOLR-1962?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12924429#action_12924429 ]

Mark Miller commented on SOLR-1962:
-----------------------------------

I'm going to commit this tomorrow.

> Index directory disagreement SolrCore#initIndex
> -----------------------------------------------
>
>                 Key: SOLR-1962
>                 URL: https://issues.apache.org/jira/browse/SOLR-1962
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Mark Miller
>            Assignee: Mark Miller
>            Priority: Minor
>             Fix For: Next
>
>         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.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (SOLR-1962) Index directory disagreement SolrCore#initIndex

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

Mark Miller updated SOLR-1962:
------------------------------

    Affects Version/s: 1.4
                       1.4.1
        Fix Version/s:     (was: Next)
                       4.0
                       3.1

> 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.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]