Hi All,
I am committing an index periodically using a scheduler. On a rare case I got the below exception in the committing thread, Lucene Version : 7.4.0 java.nio.channels.ClosedByInterruptException at java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:202) at sun.nio.ch.FileChannelImpl.size(FileChannelImpl.java:314) at org.apache.lucene.store.NativeFSLockFactory$NativeFSLock.ensureValid(NativeFSLockFactory.java:182) at org.apache.lucene.store.LockValidatingDirectoryWrapper.sync(LockValidatingDirectoryWrapper.java:67) at org.apache.lucene.index.SegmentInfos.write(SegmentInfos.java:466) at org.apache.lucene.index.SegmentInfos.prepareCommit(SegmentInfos.java:772) at org.apache.lucene.index.IndexWriter.startCommit(IndexWriter.java:4739) at org.apache.lucene.index.IndexWriter.prepareCommitInternal(IndexWriter.java:3281) at org.apache.lucene.index.IndexWriter.commitInternal(IndexWriter.java:3449) at org.apache.lucene.index.IndexWriter.commit(IndexWriter.java:3414) After this exception I am getting the below exception subsequently while trying to commit the index, org.apache.lucene.store.AlreadyClosedException: FileLock invalidated by an external force: NativeFSLock(path=C:\luc-index\write.lock,impl=sun.nio.ch.FileLockImpl[0:9223372036854775807 exclusive invalid],creationTime=2019-03-29T10:40:15.601535Z) at org.apache.lucene.store.NativeFSLockFactory$NativeFSLock.ensureValid(NativeFSLockFactory.java:178) at org.apache.lucene.store.LockValidatingDirectoryWrapper.syncMetaData(LockValidatingDirectoryWrapper.java:61) at org.apache.lucene.index.SegmentInfos.prepareCommit(SegmentInfos.java:771) at org.apache.lucene.index.IndexWriter.startCommit(IndexWriter.java:4739) at org.apache.lucene.index.IndexWriter.prepareCommitInternal(IndexWriter.java:3281) at org.apache.lucene.index.IndexWriter.commitInternal(IndexWriter.java:3449) at org.apache.lucene.index.IndexWriter.commit(IndexWriter.java:3414) Has anybody faced this exception before and know the root cause of this issue? Thanks in Advance, Satyan