Building a second index on a FAT32 drive from OSX fails with 
OverlappingFileLockException
-----------------------------------------------------------------------------------------

                 Key: LUCENE-3481
                 URL: https://issues.apache.org/jira/browse/LUCENE-3481
             Project: Lucene - Java
          Issue Type: Bug
          Components: core/index
    Affects Versions: 3.1
         Environment: Mac OSX 10.7 Lion with attached FAT32 disc
            Reporter: Paul taylor


Building a new index using FSDirectory.open(new File(path) on a FAT32 drive 
from OSX. Once the index has built but the index writer has not been closed 
because I want to optimize it I create a new indexwriter to create a second 
completely different index. However this fails with 

Exception in thread "main" java.nio.channels.OverlappingFileLockException
    at 
sun.nio.ch.FileChannelImpl$SharedFileLockTable.checkList(FileChannelImpl.java:1166)
    at 
sun.nio.ch.FileChannelImpl$SharedFileLockTable.add(FileChannelImpl.java:1068)
    at sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:868)
    at java.nio.channels.FileChannel.tryLock(FileChannel.java:962)
    at org.apache.lucene.store.NativeFSLock.obtain(NativeFSLockFactory.java:216)
    at org.apache.lucene.store.Lock.obtain(Lock.java:72)
    at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:1097)  

but this should not occur as I am not locking the same file, this second index 
is being built in a different directory albeit with the same parent directory 
as the other index.

I think the issue is specifically to do with OSX - FAT32 interaction because 
the problem always occurs, but never occurs if I build the indexes on the 
internal Mac drive. 

The only way I could resolve this was to remove locking using 

FSDirectory.open(new File(path), NoLockFactory.getNoLockFactory() );

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Reply via email to