Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 75220 invoked from network); 20 Feb 2009 07:55:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Feb 2009 07:55:26 -0000 Received: (qmail 46798 invoked by uid 500); 20 Feb 2009 07:55:25 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 46773 invoked by uid 500); 20 Feb 2009 07:55:25 -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 46764 invoked by uid 99); 20 Feb 2009 07:55:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Feb 2009 23:55:25 -0800 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; Fri, 20 Feb 2009 07:55:25 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id ADBA7234C498 for ; Thu, 19 Feb 2009 23:55:04 -0800 (PST) Message-ID: <419428724.1235116504710.JavaMail.jira@brutus> Date: Thu, 19 Feb 2009 23:55:04 -0800 (PST) From: "Martijn Hendriks (JIRA)" To: dev@jackrabbit.apache.org Subject: [jira] Updated: (JCR-1117) Bundle cache is not rolled back when the storage of a ChangeLog fails In-Reply-To: <24934524.1189431569576.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/JCR-1117?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Martijn Hendriks updated JCR-1117: ---------------------------------- Attachment: JCR-1117-v2.patch The first patch clears the cache too late. Suppose that the storage of a changelog fails, and blockOnConnectionLoss is true, then storage of the ChangeLog is retried with the corrupt bundle cache until it succeeeds. If this succeeds, then possibly corrupt bundles have been flushed to the DB. > Bundle cache is not rolled back when the storage of a ChangeLog fails > --------------------------------------------------------------------- > > Key: JCR-1117 > URL: https://issues.apache.org/jira/browse/JCR-1117 > Project: Jackrabbit Content Repository > Issue Type: Bug > Components: jackrabbit-core > Affects Versions: 1.3 > Reporter: Martijn Hendriks > Assignee: Martijn Hendriks > Attachments: JCR-1117-v2.patch, JCR-1117.patch, stacktrace.txt > > > The bundle cache in the bundle persistence managers is not restored to its old state when the AbstractBundlePersistenceManager.store(ChangeLog changeLog) method throws an exception. If, for instance, the storage of references fails then the AbstractBundlePersistenceManager.putBundle(NodePropBundle bundle) method has already been called for all modified bundles. Because of the connection rollback, the bundle cache will be out-of-sync with the persistent state. As a result, the SharedItemStateManager will have an incorrect view of the persistent state. > Furthermore, if the blockOnConnectionLoss property is set to true, then the BundleDbPersistenceManager can be caught in an infinite loop because of invalid SQL inserts because of an incorrect bundle cache; see attached stacktrace. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.