searches and updates concurrency problem

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

searches and updates concurrency problem

Stefano Buliani
Hi everyone,
I'm a newbie of Lucene, just installed it.
My problem is that the index update procedure and the searches could run
simultaneously, and, if they do, they corrupt the index file.
Is there a way to let Lucene handle this concurrency automatically (like
stop the searches till the update is finished)?
Thanks,
        Stefano


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

Reply | Threaded
Open this post in threaded view
|

Re: searches and updates concurrency problem

Maik Schreiber-2
> My problem is that the index update procedure and the searches could run
> simultaneously, and, if they do, they corrupt the index file.
> Is there a way to let Lucene handle this concurrency automatically (like
> stop the searches till the update is finished)?

Lucene does not handle this by itself but relies on outside synchronization.
You might want to have a look at LuceneIndexAccessor (please see
http://issues.apache.org/bugzilla/show_bug.cgi?id=34995)

--
Maik Schreiber   *   http://www.blizzy.de

GPG public key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x1F11D713
Key fingerprint: CF19 AFCE 6E3D 5443 9599 18B5 5640 1F11 D713

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

Reply | Threaded
Open this post in threaded view
|

Re: searches and updates concurrency problem

"Thomas Plümpe"
In reply to this post by Stefano Buliani
Thanks Stefano,

well done. It's not for sure that the concurrently running
updates and searches do corrupt the index (a full update that
removes the files and rebuilds them can obviously do so), but
I'm sure they'll get the point and will tell us how things like
that are handled.

Best,
Thomas


> --- Urspr?ngliche Nachricht ---
> Von: Stefano Buliani <[hidden email]>
> An: [hidden email]
> Betreff: searches and updates concurrency problem
> Datum: Mon, 06 Jun 2005 10:11:15 +0100
>
> Hi everyone,
> I'm a newbie of Lucene, just installed it.
> My problem is that the index update procedure and the searches could run
> simultaneously, and, if they do, they corrupt the index file.
> Is there a way to let Lucene handle this concurrency automatically (like
> stop the searches till the update is finished)?
> Thanks,
> Stefano
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

--
Geschenkt: 3 Monate GMX ProMail gratis + 3 Ausgaben stern gratis
++ Jetzt anmelden & testen ++ http://www.gmx.net/de/go/promail ++

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

Reply | Threaded
Open this post in threaded view
|

Re: searches and updates concurrency problem

Aalap Parikh
In reply to this post by Maik Schreiber-2
Hi,

As per my understanding of Lucene, I think concurrent
search and update to an index should not corrupt the
index, given that only a single index-modifying
operation is executing at any point of time. So in
short, you can have multiple search operations and not
more than one index update (add and/or delete)
operation in progress at any time and that should not
corrupt the index.


Thanks,
Aalap.
 
--- Maik Schreiber
<[hidden email]> wrote:

> > My problem is that the index update procedure and
> the searches could run
> > simultaneously, and, if they do, they corrupt the
> index file.
> > Is there a way to let Lucene handle this
> concurrency automatically (like
> > stop the searches till the update is finished)?
>
> Lucene does not handle this by itself but relies on
> outside synchronization.
> You might want to have a look at LuceneIndexAccessor
> (please see
>
http://issues.apache.org/bugzilla/show_bug.cgi?id=34995)
>
> --
> Maik Schreiber   *   http://www.blizzy.de
>
> GPG public key:
>
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x1F11D713
> Key fingerprint: CF19 AFCE 6E3D 5443 9599 18B5 5640
> 1F11 D713
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [hidden email]
> For additional commands, e-mail:
> [hidden email]
>
>



               
__________________________________
Yahoo! Mail
Stay connected, organized, and protected. Take the tour:
http://tour.mail.yahoo.com/mailtour.html 


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

Reply | Threaded
Open this post in threaded view
|

Re: searches and updates concurrency problem

Daniel Naber
In reply to this post by Stefano Buliani
On Monday 06 June 2005 11:11, Stefano Buliani wrote:

> My problem is that the index update procedure and the searches could run
> simultaneously, and, if they do, they corrupt the index file.

Search is a read-only thing, so why should it corrupt the index? Even
having several writers at the same time will not corrupt the index, you'll
get an IOException because of the lock files instead.

Regards
 Daniel

--
http://www.danielnaber.de

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