Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 52528 invoked from network); 21 Apr 2009 08:36:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 21 Apr 2009 08:36:09 -0000 Received: (qmail 7948 invoked by uid 500); 21 Apr 2009 08:36:09 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 7865 invoked by uid 500); 21 Apr 2009 08:36:08 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 7857 invoked by uid 99); 21 Apr 2009 08:36:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Apr 2009 08:36:08 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Apr 2009 08:36:08 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 98319234C041 for ; Tue, 21 Apr 2009 01:35:47 -0700 (PDT) Message-ID: <696811128.1240302947622.JavaMail.jira@brutus> Date: Tue, 21 Apr 2009 01:35:47 -0700 (PDT) From: "Jukka Zitting (JIRA)" To: dev@jackrabbit.apache.org Subject: [jira] Updated: (JCR-2057) When creating multiple repository instances pointing to the same home, opening a second session will remove the .lock file In-Reply-To: <306780979.1239094092953.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/JCR-2057?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:all-tabpanel ] Jukka Zitting updated JCR-2057: ------------------------------- Fix Version/s: (was: 1.6.0) 1.5.5 Merged to the 1.5 branch in revision 767069. > When creating multiple repository instances pointing to the same home, op= ening a second session will remove the .lock file > -------------------------------------------------------------------------= ------------------------------------------------- > > Key: JCR-2057 > URL: https://issues.apache.org/jira/browse/JCR-2057 > Project: Jackrabbit Content Repository > Issue Type: Bug > Components: jackrabbit-core > Affects Versions: core 1.4.7, 1.5.3 > Environment: Ubuntu Intrepid > Reporter: S=C3=A9bastien Launay > Fix For: 1.5.5 > > Attachments: JCR-2057-2009-04-07.zip > > > The following test case can be used to reproduce the bug: > Repository repo1 =3D new TransientRepository(repoConfig); > Session session1_1 =3D repo1.login(...); > Session session2_2 =3D repo1.login(...); > Repository repo2 =3D new TransientRepository(repoConfig); // Will not fai= l (expected) > Session session2_1 =3D repo2.login(...); // Will fail with javax.jcr.Repo= sitoryException: The repository home /tmp/_repository appears to be already= locked by the current process (expected) > Session session2_2 =3D repo2.login(...); // Will work! > Repository repo3 =3D new TransientRepository(repoConfig); // Will not fai= l either (expected) > Session session3_1 =3D repo3.login(...); // Will fail with javax.jcr.Repo= sitoryException: The repository home /tmp/_repository appears to be already= locked by the current process (expected) > Session session3_2 =3D repo3.login(...); // Will fail with javax.jcr.Repo= sitoryException: Directory was previously created with a different LockFact= ory instance > Open the first session in repo2 will fails but will also remove the .lock= file, thus the second > session will succeed and may corrupt the repository because there are mul= tiple session > opened from multiple repository. > The same behaviour occurs for repo3, the .lock file is removed but it is = a slightly different case > as a new exception will be thrown while creating the Lucene index. > This is a clearly a twisted case as repositories pointing to the same hom= e must not be created > simultaneously but i think that it must be more robust to prevent data co= rruption. > I reproduce the bug on JR 1.4.7 and 1.5.3 but i think it affects at least= all versions of JR < 1.5.3. --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.