lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless" <luc...@mikemccandless.com>
Subject Re: CheckIndex tool
Date Sun, 11 Nov 2007 19:06:10 GMT
"Ryan McKinley" <ryantxu@gmail.com> wrote:
> I just used the CheckIndex tool to try to salvage a corrupt index 
> (http://www.nabble.com/restoring-a-corrupt-index--tf4783866.html)
> 
> Its a great tool thanks!

Phew!  I think you are the first user (besides me).

> I'm wondering about adding support for this tool in the solr admin 
> interface, but have a few questions about how it works before I see if 
> that is a good idea or not.
> 
> Would it be safe to run this tool while searching the index?

This should be safe.  This tool does not delete any files: it only
writes a new segments_N+1 file that has dropped references to those
segments that had trouble loading.

> Would it be safe to run during an update?

Not as it currently stands: the tool does not acquire the write lock,
so, if another writer is working on the index, it would cause problems
in that both this tool and the writer would try to write the
segments_N file, possibly at different times (in which case the later
one would overwrite the first one) or at/near the same time (in which
case on Windows one would hit an IOException).

We could fix the tool to acquire the write.lock, though this isn't
perfect since the tool doesn't know the locking configuration for your
index (eg using NativeFSSLockFactory or SimpleFSLockFactory, maybe
with a different lock directory, etc.).

Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message