Return-Path: X-Original-To: apmail-jackrabbit-oak-dev-archive@minotaur.apache.org Delivered-To: apmail-jackrabbit-oak-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4F004F9C7 for ; Mon, 8 Apr 2013 11:30:06 +0000 (UTC) Received: (qmail 83536 invoked by uid 500); 8 Apr 2013 11:30:06 -0000 Delivered-To: apmail-jackrabbit-oak-dev-archive@jackrabbit.apache.org Received: (qmail 83430 invoked by uid 500); 8 Apr 2013 11:30:05 -0000 Mailing-List: contact oak-dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: oak-dev@jackrabbit.apache.org Delivered-To: mailing list oak-dev@jackrabbit.apache.org Received: (qmail 83404 invoked by uid 99); 8 Apr 2013 11:30:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Apr 2013 11:30:04 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS,T_FRT_BELOW2 X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jukka.zitting@gmail.com designates 209.85.214.176 as permitted sender) Received: from [209.85.214.176] (HELO mail-ob0-f176.google.com) (209.85.214.176) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Apr 2013 11:29:59 +0000 Received: by mail-ob0-f176.google.com with SMTP id er7so5499547obc.7 for ; Mon, 08 Apr 2013 04:29:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=xAI3g5kXz1SQ5qqFmyQZ+iT1+/floiPm6smcktqCW6Q=; b=YPEj12na8YZVJuOcgjfIrSxJX1J7z6Jj4UzzKCnN006T6VS6ehYsZZ4/5ZwS5Iwdv7 Woi14AZlyf2heCk21Sr2zuVZALfxdLDzWXuyPU0CplvSMPJVdaxazF9iSWpZhQthom7Q xzdTfQMfrGse5kIlKAHuyrOBc7HcJVY15T02vqHxkNuHfDwUCFZ8eGDlUkrAIQ6FCmPU xKM4Ei6xyoemLVxMe1zgIPYelNLbxPHyL6i4cCJv8ToW9nqftufWJ1ZrmZYKUo4hQK1s yYQm+zrS8kIZL2SYkJF7HPHd8Uvp0U5D5y5FDMrFLurU+bXYV3eDmRHbXTw6BnNoHnzj 4t4A== X-Received: by 10.60.102.73 with SMTP id fm9mr2741633oeb.110.1365420578162; Mon, 08 Apr 2013 04:29:38 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.132.20 with HTTP; Mon, 8 Apr 2013 04:29:18 -0700 (PDT) In-Reply-To: <5162A706.6090508@adobe.com> References: <5162A706.6090508@adobe.com> From: Jukka Zitting Date: Mon, 8 Apr 2013 14:29:18 +0300 Message-ID: Subject: Re: Exception when simultaneously 2 Jcr objects are created with the same db storage To: Oak devs Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Hi, On Mon, Apr 8, 2013 at 2:16 PM, Tudor Rogoz 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