lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: Make auto fix delay configurable in CheckIndex.checkIndex?
Date Sun, 07 Sep 2008 10:54:26 GMT

OK -- I like that suggestion Andrew, so I incorporated it into new  
patch on LUCENE-1354.  Now, it's CheckIndex's static main() that does  
that sleep, and then calls fix.  This way you can call fix directly  
from your code.

Mike

Andrew Zhang wrote:

>
>
> On Sat, Sep 6, 2008 at 12:01 AM, Michael McCandless <lucene@mikemccandless.com 
> > wrote:
>
> This definitely makes sense -- there is an issue opened, with  
> initial patch, to make programmatic access to CheckIndex possible,  
> that may already cover this?
>
> Hi,
>
> Thanks for the information!  It's https://issues.apache.org/jira/browse/LUCENE-1354
>
> I took a look at the initial patch, but it still sleeps 5 seconds  
> before doing auto fix.
>
> We may make it configurable, or provide a method fix() for end user?  
> i.e.
>
> IndexChecker checker = new IndexChecker(....);
> boolean ok = checker.check();
> if(!ok) {
>   checker.fix(); // or do some other thing?
> }
>
>
> Mike
>
>
> Andrew Zhang wrote:
>
> Hi,
>
> Currently, CheckIndex.checkIndex sleeps 5 seconds before fixing  
> corrupted index. Does it make sense to make it configurable? Some  
> applications just want to fix it asap.
>
> -- 
> Best regards,
> Andrew Zhang
>
> db4o - database for Android: www.db4o.com
> http://zhanghuangzhu.blogspot.com/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-dev-help@lucene.apache.org
>
>
>
>
> -- 
> Best regards,
> Andrew Zhang
>
> db4o - database for Android: www.db4o.com
> http://zhanghuangzhu.blogspot.com/


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


Mime
View raw message