Hi, On Tue, Sep 20, 2011 at 6:17 PM, mmjose26 <[email protected]> wrote: > Reading more deeply the source code of JR and some older posts, the > Session.refresh() method enforces to synchronize all cluster nodes, but, > this is not supported in jcr2spi layer.
The basic assumption here is that the cluster is either behind a load balancer that supports client affinity or that each client resolves the cluster domain name to the IP address of a specific cluster node, so that in normal circumstances a single client would only be talking with one node of the cluster. In this scenario the problem of delayed updates you describe will never happen. > so I extended the SessionProviderImpl from org.apache.jackrabbit.server, and > override the method getSession so that in each getSession call, I do a > session.refresh() before of return the session. It works fine. Note that the cluster sync can be pretty expensive performance-wise, so invoking it too often can significantly slow down the repository. > I think that this is necessary due to each http request from a client DavExt > could be answered by any node in the cluster(thinking in one load balancer > plus clustered nodes) and some times (as this scenario) may occurs > unexpected behavior. I would recommend instead configuring the load balancer to use client affinity. BR, Jukka Zitting
