jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting" <jukka.zitt...@gmail.com>
Subject Re: Database connections & queries
Date Thu, 30 Aug 2007 07:39:37 GMT
Hi,

On 8/30/07, Martijn Hendriks <martijnh@gx.nl> wrote:
> 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.

I don't see that as a big problem. It's roughly equivalent to the
following case:

    Session sessionA = ...;
    Session sessionB = ...;

    Node node = sessionA.getRootNode().getNode("path/to/node");

    sessionB.getRootNode().getNode("path/to/node").remove();
    sessionB.save();

    node.getProperty(...);

BR,

Jukka Zitting

Mime
View raw message