Return-Path: Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: (qmail 95811 invoked from network); 7 Jun 2007 20:01:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Jun 2007 20:01:00 -0000 Received: (qmail 70544 invoked by uid 500); 7 Jun 2007 20:01:03 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 70523 invoked by uid 500); 7 Jun 2007 20:01:03 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 70514 invoked by uid 99); 7 Jun 2007 20:01:03 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Jun 2007 13:01:03 -0700 X-ASF-Spam-Status: No, hits=-98.6 required=10.0 tests=ALL_TRUSTED,INFO_TLD,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Jun 2007 13:00:58 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id A7BB21A981A; Thu, 7 Jun 2007 13:00:38 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r545289 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapter.java Date: Thu, 07 Jun 2007 20:00:38 -0000 To: commits@activemq.apache.org From: chirino@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070607200038.A7BB21A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: chirino Date: Thu Jun 7 13:00:37 2007 New Revision: 545289 URL: http://svn.apache.org/viewvc?view=rev&rev=545289 Log: Fix for the DefaultStoreXARecoveryBrokerTest test failure. Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapter.java Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapter.java URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapter.java?view=diff&rev=545289&r1=545288&r2=545289 ============================================================================== --- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapter.java (original) +++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapter.java Thu Jun 7 13:00:37 2007 @@ -175,14 +175,26 @@ } },"ActiveMQ Journal Checkpoint Worker"); createTransactionStore(); - if(referenceStoreAdapter.isStoreValid()==false){ - log.warn("The ReferenceStore is not valid - recovering ..."); - recover(); - log.info("Finished recovering the ReferenceStore"); - }else { - Location location=writeTraceMessage("RECOVERED "+new Date(),true); - asyncDataManager.setMark(location,true); - } + +// +// The following was attempting to reduce startup times by avoiding the log +// file scanning that recovery performs. The problem with it is that XA transactions +// only live in transaction log and are not stored in the reference store, but they still +// need to be recovered when the broker starts up. Perhaps on a graceful shutdown we +// should record all the in flight XA transactions to a file to avoid having to scan +// the entire transaction log. For now going to comment this bit out. +// +// if(referenceStoreAdapter.isStoreValid()==false){ +// log.warn("The ReferenceStore is not valid - recovering ..."); +// recover(); +// log.info("Finished recovering the ReferenceStore"); +// }else { +// Location location=writeTraceMessage("RECOVERED "+new Date(),true); +// asyncDataManager.setMark(location,true); +// } + + recover(); + // Do a checkpoint periodically. periodicCheckpointTask=new Runnable(){