Make auto fix delay configurable in CheckIndex.checkIndex?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Make auto fix delay configurable in CheckIndex.checkIndex?

Andrew Zhang-2
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/
Reply | Threaded
Open this post in threaded view
|

Re: Make auto fix delay configurable in CheckIndex.checkIndex?

Michael McCandless-2

This definitely makes sense -- there is an issue opened, with initial  
patch, to make programmatic access to CheckIndex possible, that may  
already cover this?

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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Make auto fix delay configurable in CheckIndex.checkIndex?

Andrew Zhang-2


On Sat, Sep 6, 2008 at 12:01 AM, Michael McCandless <[hidden email]> 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: [hidden email]
For additional commands, e-mail: [hidden email]




--
Best regards,
Andrew Zhang

db4o - database for Android: www.db4o.com
http://zhanghuangzhu.blogspot.com/
Reply | Threaded
Open this post in threaded view
|

Re: Make auto fix delay configurable in CheckIndex.checkIndex?

Michael McCandless-2

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 <[hidden email]
> > 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: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
>
>
> --
> Best regards,
> Andrew Zhang
>
> db4o - database for Android: www.db4o.com
> http://zhanghuangzhu.blogspot.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Make auto fix delay configurable in CheckIndex.checkIndex?

Andrew Zhang-2


On Sun, Sep 7, 2008 at 6:54 PM, Michael McCandless <[hidden email]> wrote:

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.

Great! I see the fix in the patch. Thanks a lot, Mike!


Mike


Andrew Zhang wrote:



On Sat, Sep 6, 2008 at 12:01 AM, Michael McCandless <[hidden email]> 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: [hidden email]
For additional commands, e-mail: [hidden email]




--
Best regards,
Andrew Zhang

db4o - database for Android: www.db4o.com
http://zhanghuangzhu.blogspot.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]




--
Best regards,
Andrew Zhang

db4o - database for Android: www.db4o.com
http://zhanghuangzhu.blogspot.com/