Book Image

Apache Solr High Performance

By : Surendra Mohan
Book Image

Apache Solr High Performance

By: Surendra Mohan

Overview of this book

Table of Contents (14 chapters)

Dealing with the locked index


Imagine a situation where, while the indexing process was active, something went wrong, probably your machine crashed or a problem occurred in your virtual machine, resulting in index locking. Let me remind you that when indexing is in progress, it locks the current file in the index directory. When this process aborts abruptly due to certain reasons, the file that is already locked remains as it is, restricting the modification of the index. Our motive would be to sort out this locking issue, and we will learn how to do it in this section.

Let us assume that during the commit operation, our Java Virtual Machine crashed and an intern killed our Solr master instance while the indexing was in progress. The Jetty servlet container normally throws an exception, which looks as follows:

SEVERE: Exception during commit/optimize:java.io.IOException: Lock obtain timed out: SimpleFSLock@/usr/share/solr/data/index/luceneff1fe872c2cbfeb44091b36c21a97c14-write.lock

If you...