jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martijn Hendriks" <marti...@gx.nl>
Subject RE: Database connections & queries
Date Thu, 30 Aug 2007 07:31:48 GMT

> -----Original Message-----
> From: Jukka Zitting [mailto:jukka.zitting@gmail.com] 

> On 8/29/07, Martijn Hendriks <martijnh@gx.nl> wrote:
> > That's a nice idea! But wouldn't it be confusing that one can get a 
> > Node object through the nextNode() method which does not 
> exist in the 
> > repository anymore?
> The search index should always be in sync with the persistent 
> state, so such situations should not happen.

If we don't take a clustered setup into account, then indeed the search
index should always be in sync with the persistent state. The ScoreNode
objects in the LazyQueryResultImpls resultNodes field are, however, in
general not in sync with the persistent state as they are always loaded
during the construction of the LazyQueryResultImpl (because the
Searchindex.getResultFetchSize() currently returns Integer.MAX_VALUE).
Thus, after construction of the LazyQueryResultImpl another thread could
remove nodes that are in the resultNodes array of the
LazyQueryResultImpl with the behaviour described above as a consequence.

Best wishes,


View raw message