Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-3481

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

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.1
    • None
    • core/index
    • Mac OSX 10.7 Lion with attached FAT32 disc

    • New

    Description

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

      Attachments

        Activity

          People

            Unassigned Unassigned
            ijabz Paul taylor
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: