Locks in elasticsearch Locks in elasticsearch elasticsearch elasticsearch

Locks in elasticsearch


The answer is none of the above. Elasticsearch is based on Lucene which starting with v4.0 (Elasticsearch v1.0) is using lockless concurrent updates. Because there are no locks, you have to rely on optimistic concurrency control if you application need to update the same record at the same time.

It doesn't mean that there are no locks in Elasticsearch though. Some global operation has to be done in a centralized manner. For example, if multiple clients try to create an index with the same name at the same time, only one of them will succeed because this operation affects cluster state and therefore is performed on the master node on a single thread.