lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shalin Shekhar Mangar" <shalinman...@gmail.com>
Subject Re: New User: Question about index locking options
Date Wed, 24 Dec 2008 03:53:05 GMT
On Wed, Dec 24, 2008 at 3:31 AM, Alan May <j.alan.may@gmail.com> wrote:

>
> I have multiple SolrJ clients that will be sending small update requests
> but
> should be staggered in time to prevent concurrent updates.  However, to add
> additional margin of error, I would like to apply the safest locking
> mechanism possible to avoid corruption.  We have a single solr server.
>  From
> what I'm reading in the solrconfig.xml, I'm gathering that perhaps the
> NativeFSLockFactory would be more appropriate than the default
> SingleInstanceLockFactory or the SimpleFSLockFactory.
>

Solr supports query/update requests from multiple threads and there is no
explicit locking per client. You don't need to worry about the lock section
in solrconfig.xml. It is intended to protect the index from external changes
(an external application writing direcly to the index or when multiple Solr
processes are accidentally started on the same index folder).

Go ahead and have your clients query/update Solr. Just note that all changes
to the index will be visible after a commit. So make sure the last client
calls a commit or else use the autoCommit feature.

HTH.

-- 
Regards,
Shalin Shekhar Mangar.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message