Details

Description

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);

When Solr starts, doesn't it create the index directory? If so, this patch is not needed, unless we want to make sure replication succeeds even if someone/something removes the whole index directory on a slave after the slave had already started.

Otis Gospodnetic
added a comment - 16/Mar/10 20:08 When Solr starts, doesn't it create the index directory? If so, this patch is not needed, unless we want to make sure replication succeeds even if someone/something removes the whole index directory on a slave after the slave had already started.
Is this reeeeally needed?

Hoss Man
added a comment - 27/May/10 23:08 Bulk updating 240 Solr issues to set the Fix Version to "next" per the process outlined in this email...
http://mail-archives.apache.org/mod_mbox/lucene-dev/201005.mbox/%3Calpine.DEB.1.10.1005251052040.24672@radix.cryptio.net%3E
Selection criteria was "Unresolved" with a Fix Version of 1.5, 1.6, 3.1, or 4.0. email notifications were suppressed.
A unique token for finding these 240 issues in the future: hossversioncleanup20100527

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.

kafka0102
added a comment - 23/Nov/10 02:40 - edited 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.

Faizan Aziz
added a comment - 31/Jul/12 08:59 ok.... The fix by kafka0102 is there so I guess the patch is not needed.... However I am still getting the error
SEVERE: Unable to copy index file from: /opt/solr/multicore/1011/data/index.20120731065949/_9x.tis to: /mnt/multicore/1011/data/index.20120731050740/_9x.tis
Note: /opt/solr/multicore is a symlink to /mnt/multicore