jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dürig <mdue...@apache.org>
Subject Re: enter() method for JCR implementation classes
Date Wed, 27 Feb 2013 13:00:09 GMT


On 27.2.13 12:50, Jukka Zitting wrote:
> Hi,
>
> On Wed, Feb 27, 2013 at 11:51 AM, Michael Dürig <mduerig@apache.org> wrote:
>> The problem is actually more subtle than that. The mechanism avoids refresh
>> being called from reentrant calls to any session scoped operation (that's
>> the reason for using a counter in perform). Otherwise we risk that a session
>> is refreshed while we are in the middle of a session scoped operation. This
>> can lead to very unpredictable test failures and bugs.
>
> I'm not too worried about that, since we've always had that situation

I am though. Such in flight refreshes render internal invariants to break.

> in jackrabbit-core. The main problems this has caused are the various
> deadlocks and corruptions that we've faced there, but in Oak those
> should be non-issues since we have a much cleaner barrier between
> session-local and repository-wide information. The worst that could
> happen is a single session behaving a bit unexpectedly, and even that
> should be pretty rare as most sessions never auto-refresh.

There might be anything from NPE to AssertionError to 
IllegalStateException to undefined behaviour.

Michael

>
> BR,
>
> Jukka Zitting
>


Mime
View raw message