jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <marcel.reuteg...@gmx.net>
Subject Re: Is doc addition / indexing synchronous or asynchronous?
Date Thu, 06 Apr 2006 06:50:31 GMT
Jukka Zitting wrote:
> Marcel, just out of curiosity, would it be possible to run the indexer
> using asynchronous events or would that cause some complications?

yes, there are two issues with this approach:

- there would be no guarantee anymore that you will find nodes with a 
query that were just added. This then depends on when the asynchronous 
notification updates the index.

- in case of a jvm crash right after a change, that change might not be 
reflected in the index.

while the first point is just a temporary inconsistency, the latter is 
severe and cannot be recovered.

IMO the index should even participate in the internal two phase commit. 
With the current design a failure while indexing a change cannot 
rollback the change.

But it's certainly possible to push more of the index work into an 
background thread. most of the indexing is currently done with the 
current thread.


View raw message