You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "kafka0102 (JIRA)" <ji...@apache.org> on 2010/11/23 03:46:13 UTC

[jira] Issue Comment Edited: (SOLR-1822) SEVERE: Unable to move index file from: tempfile to: indexfile

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

kafka0102 edited comment on SOLR-1822 at 11/22/10 9:45 PM:
-----------------------------------------------------------

I found the problem's reason.It's tmpDir's name same to indexDir's name. tmpIdxDirName's format is SnapShooter.DATE_FMT = "yyyyMMddhhmmss"(hh is between 1-12). If I have a indexDirName index.20101122031000 because of a full index repl at 2010-11-22 03:10:00. And slave's repl duration is 5 minitues. So at 2010-11-22 15:10:00, the slave made indexDirName and indexDirName both index.20101122031000, and finnaly will drop the index.After that,replication would generate the above error again and again.

So,just let  SnapShooter.DATE_FMT = "yyyyMMddHHmmss" would be fine.

      was (Author: kafka0102):
    I found the problem's reason.It's tmpDir's name same to indexDir's name. tmpIdxDirName's format is SnapShooter.DATE_FMT = "yyyyMMddhhmmss". If I have a indexDirName index.20101122031000 because of a full index repl at 2010-11-22 03:10:00. And slave's repl duration is 5 minitues. So at 2010-11-22 15:10:00, the slave made indexDirName and indexDirName both index.20101122031000, and finnaly will drop the index.After that,replication would generate the above error again and again.
  
> SEVERE: Unable to move index file from: tempfile to: indexfile
> --------------------------------------------------------------
>
>                 Key: SOLR-1822
>                 URL: https://issues.apache.org/jira/browse/SOLR-1822
>             Project: Solr
>          Issue Type: Bug
>          Components: replication (java)
>    Affects Versions: 1.4
>         Environment: Linux, JDK6,SOLR 1.4
>            Reporter: wyhw whon
>            Priority: Critical
>             Fix For: Next
>
>         Attachments: SnapPuller.patch
>
>
> SOLR index directory remvoed,but do not know what the reasons for this.
> I add some codes on SnapPuller.java 577 line can reslove this bug.
> line 576                           
> File indexFileInIndex = new File(indexDir, fname);
> +
> if (!indexDir.exists()) indexDir.mkdir();
> boolean success = indexFileInTmpDir.renameTo(indexFileInIndex);

-- 
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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org