jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Guggisberg <stefan.guggisb...@gmail.com>
Subject Re: jackrabbit deployment model 1
Date Mon, 18 Jul 2005 09:26:46 GMT
On 7/14/05, Edgar Poce <edgarpoce@gmail.com> wrote:
> Hi richard
> 
> On 7/14/05, Guozhong (Richard) Wang <guozhong.wang@oracle.com> wrote:
> > Julien and Marcel,
> >
> > But if the internal cache is disabled as Julien did,
> > in theory should multiple Repos be able to simultaneously access the
> > storage?
> 
>  I don't think so. The concurrency control is done at the
> SharedItemStateManager level (see
> http://issues.apache.org/jira/browse/JCR-164). So, two jackrabbit
> instances accessing the same physical storage will probably lead to
> corrupt data. And among other problems, the search index on each
> instance would be unaware of the changes made by the other, and the
> observation wouldn't work as expected.

edgar is perfectly right. the purpose of SharedItemStateManager is not 
just to provide caching on the persistence layer for better performance. 
SharedItemStateManager plays an crucial role in jackrabbit's implementation 
of isolation levels. it guarantees that there exists at most  just one ItemState
instance per id at any time. that's why it's not called
*SharedItemStateCache* ;)

disabling caching is therefore not a very good idea and i am not
surprised at all
that some test cases fail if you do so.

cheers 
stefan

> 
> As marcel already said, clustering is not that easy
> 
> BR,
> edgar
> 
> >
> > thanks,
> > Richard
> >
> > Julien Viet wrote:
> >
> > > If you disable the cache then you reload everything all the time and
> > > should achieve the desired effect, but performances will suffer a lot.
> > >
> > > By the way I disabled the cache in jackrabbit (I simple modified the
> > > code to have the SharedItemCache have the put() do a noop).
> > >
> > > Some tests were not passing with that change. I think it is not normal
> > > to have the tests failing when the cache is disabled (even if it
> > > is uses a hack to make it not effective)
> > >
> > > Marcel Reutegger wrote:
> > >
> > >> Julien Viet wrote:
> > >>
> > >>> because jackrabbit uses an internal cache that you cannot disable.
> > >>
> > >>
> > >>
> > >> and even if you would be able to disable the cache, one instance had
> > >> to tell the other one that something has changed on disc. otherwise
> > >> you would have to scan the filesystem all the time for possible changes.
> > >>
> > >> clustering is not that easy ;)
> > >>
> > >> regards
> > >>  marcel
> > >>
> > >
> > >
> >
> >
>

Mime
View raw message