jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jukka Zitting <jukka.zitt...@gmail.com>
Subject Re: Exception when simultaneously 2 Jcr objects are created with the same db storage
Date Mon, 08 Apr 2013 11:29:18 GMT
Hi,

On Mon, Apr 8, 2013 at 2:16 PM, Tudor Rogoz <rogoz@adobe.com> wrote:
> I get the bellow exception [0] when at least 2 JCRs are instantiated at the
> same time on different cluster nodes.Is this a bug, should be this situation
> managed or not?

Looks like the two clients are trying to initialize the repository at
the same time, which correctly makes the second initialization fail
with a conflict.

I wouldn't worry too much about this scenario, as I don't expect such
concurrent initialization to be a common occurrence beyond test cases.
Normal deployments would more likely intialize the repository first
before starting multiple concurrent clients.

In fact it might even be a good idea to explicitly decouple repository
initialization from the construction of a ContentRepository object, as
that will help clear up the workflow in such cases. Alternatively we
could look at making the repository initialization code more robust
against concurrent use, for example by having it capture the conflict
exception and ignore it if someone else already managed to imitialize
the repository.

BR,

Jukka Zitting

Mime
View raw message