mirror of
https://github.com/apache/lucene.git
synced 2025-02-20 17:07:09 +00:00
safe, but also "process safe": multiple processes may may now search an index while it is being updated from another process. Two lock files are used in an index. One is "commit.lock". This is used to synchronize commits [IndexWriter.close()] with opens [IndexReader.open()]. Since these actions are short-lived, attempts to obtain this lock will block for up to ten seconds, which should be plenty of time, before an exception is thrown. The second lock file is "write.lock". This is used to enforce the restriction that only one process should be adding documents to an index at a time. This is created when an IndexWriter is constructed and removed when it is closed. If index writing is aborted then this file must be manually removed. Attempts to index from another process will immediately throw an exception. It should be impossible to corrupt an index through the Lucene API. However if a Lucene process exits unexpectedly it can leave the index locked. The remedy is simply to, at a time when it is certain that no processes are accessing the index, remove all lock files. git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@149595 13f79535-47bb-0310-9956-ffa450edef68
Description
Apache Lucene open-source search software
671 MiB
Languages
Java
97.7%
HTML
1%
Python
0.9%
Lex
0.3%