Pessimistic locking has inherent disadvantages, overheads and is time-consuming. So what Solr and perhaps other NoSql takes is the optimistic approach because they believe that conflicts can occur but hope it to be very rare. Hence, they don't put the lock. Instead they record all the update operations and it they find that two users are trying to update the same document simultaneously, then one of the request is discarded and that user gets error message.
Read full article from Solr Optimistic Concurrency
No comments:
Post a Comment