[][src]Static tantivy::directory::INDEX_WRITER_LOCK

pub static INDEX_WRITER_LOCK: Lazy<Lock>

Only one process should be able to write tantivy's index at a time. This lock file, when present, is in charge of preventing other processes to open an IndexWriter.

If the process is killed and this file remains, it is safe to remove it manually.

Failing to acquire this lock usually means a misuse of tantivy's API, (creating more than one instance of the IndexWriter), are a spurious lock file remaining after a crash. In the latter case, removing the file after checking no process running tantivy is running is safe.